Scripting

This is where our experts try to teach you the very flexible modding system for our previous release - SOW Gettysburg and its add-ons. It's powerful, but dangerous. Post your tips and your questions.
born2see
Reactions:
Posts: 1326
Joined: Fri Apr 22, 2011 9:25 am

Re: Scripting

Post by born2see »

I haven't tried it, but can you add another Command after the close button.
Tried that. It just toggles the Toolbar back on immediately so it negates the effect.
Or on the same line as the close button - check the file to see how multiple commands are on a single line - seems I remember seeing that - might be separated by a colon.
I thought about that but I believe the colon just separates the command from it's parameters. I'll pursue it further.

There's a bunch of scripting commands in the battlescript.csv file but I'm not sure what they all do or if they'll work in the gscreens file.

I really wish the Design Team would stop creating and improving this terrific game and document this stuff so we could just screw around and waste time. ;)
Last edited by born2see on Tue Jul 12, 2011 2:36 am, edited 1 time in total.
"Those in whose judgment I rely, tell me that I fought the battle splendidly and that it was a masterpiece of art.” - George McClellan to his wife describing the battle of Antietam
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Scripting

Post by Davinci »

I really wish the Design Team would stop creating and improving this terrific game and document this stuff so we could just screw around and waste time. ;)
Modding - is probably never going to be documented, it is a sort of figure this out approach.

Besides, you will never catch me reading a stinky manual.

Update:

The togglehud is a double key-press command - so do it like this.

COMMAND - all the comma's - togglehud
COMMAND - all the comma's - togglehud

Basically - place the command twice on separate lines.

Now the toolbar will disappear when reading courier messages.

Now- back to the gscreens file.

davinci
The only true logic is that, there is no true logic!
born2see
Reactions:
Posts: 1326
Joined: Fri Apr 22, 2011 9:25 am

Re: Scripting

Post by born2see »

The togglehud is a double key-press command - so do it like this.

COMMAND - all the comma's - togglehud
COMMAND - all the comma's - togglehud

Basically - place the command twice on separate lines.

Now the toolbar will disappear when reading courier messages.
Doesn't work. I can get he toolbar to disappear when the message comes up (see my post above) but haven't figured out how to make it come back on exit. With the double COMMAND it doesn't disappear in the first place. I'll keep working on it. Meanwhile get that Map thing to work...
Modding - is probably never going to be documented, it is a sort of figure this out approach
Garnier's SDK docs cover quite a bit but there's still a lot left to trial and error.
"Those in whose judgment I rely, tell me that I fought the battle splendidly and that it was a masterpiece of art.” - George McClellan to his wife describing the battle of Antietam
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Scripting

Post by Davinci »

Here is a temp - backup - plan - if you do not come up with something, I'm off to run an errand.

Place another CANBUTTON directly below the first one - you will have to press it twice for the toolbar to reappear. Check Screenshot - button is invisible - but game still accepts coordinates.

Problem - you must click twice - before you exit courier screen, or you can exit and press the U key twice.

NEW,Courier,POPUP_Courier.dds,,,1,1,1,768,768,1024,1024,,,
COMMAND,,,,,,,,,,,,,,togglehud
COMMAND,,,,,,,,,,,,,,togglehud
BASEFONT,,,MsgFont-L-20,20,20,,,,,,,,,
CANBUTTON,,,, Exit ,,720,706,39,44,720,706,,,close
CANBUTTON,,,, Hud,,770,706,39,44,770,706,,,togglehud:togglehud
FORMAT,,,,,,75,60,630,650,0,0,,,&formatted:$param2
SCROLL,,,, Up ,-1,737,8,17,18,737,8,,,&formatted
SCROLL,,,, Down,1,738,675,17,19,738,675,,,&formatted
THUMB,,,,,,0,0,0,0,0,0,,,&formatted

davinci
Attachments
hud1.jpg
hud1.jpg (244.95 KiB) Viewed 354 times
The only true logic is that, there is no true logic!
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Scripting

Post by Davinci »

Doesn't work.
It does work - check the above post.

davinci
The only true logic is that, there is no true logic!
born2see
Reactions:
Posts: 1326
Joined: Fri Apr 22, 2011 9:25 am

Re: Scripting

Post by born2see »

We're cross-posting. I was referring to this
Update:

The togglehud is a double key-press command - so do it like this.

COMMAND - all the comma's - togglehud
COMMAND - all the comma's - togglehud

Basically - place the command twice on separate lines.

Now the toolbar will disappear when reading courier messages
I haven't tried your latest post.
"Those in whose judgment I rely, tell me that I fought the battle splendidly and that it was a masterpiece of art.” - George McClellan to his wife describing the battle of Antietam
Amish John
Reactions:
Posts: 894
Joined: Thu Jan 24, 2008 8:20 am

Re: Scripting

Post by Amish John »

Here is a temp - backup - plan - if you do not come up with something, I'm off to run an errand.

Place another CANBUTTON directly below the first one - you will have to press it twice for the toolbar to reappear. Check Screenshot - button is invisible - but game still accepts coordinates.

Problem - you must click twice - before you exit courier screen, or you can exit and press the U key twice.

NEW,Courier,POPUP_Courier.dds,,,1,1,1,768,768,1024,1024,,,
COMMAND,,,,,,,,,,,,,,togglehud
COMMAND,,,,,,,,,,,,,,togglehud
BASEFONT,,,MsgFont-L-20,20,20,,,,,,,,,
CANBUTTON,,,, Exit ,,720,706,39,44,720,706,,,close
CANBUTTON,,,, Hud,,770,706,39,44,770,706,,,togglehud:togglehud
FORMAT,,,,,,75,60,630,650,0,0,,,&formatted:$param2
SCROLL,,,, Up ,-1,737,8,17,18,737,8,,,&formatted
SCROLL,,,, Down,1,738,675,17,19,738,675,,,&formatted
THUMB,,,,,,0,0,0,0,0,0,,,&formatted

davinci
Nice. Did one or both of you do more work on the letters? The caps look good and only a couple lower case look cut off a bit (a and lower part of f).
You can get farther with a kind word and a gun than you can with a kind word alone.
born2see
Reactions:
Posts: 1326
Joined: Fri Apr 22, 2011 9:25 am

Re: Scripting

Post by born2see »

It's all Davinci with his newly found Font Editor. I think he's just getting started but said in an earlier post he might give it a rest for awhile.
"Those in whose judgment I rely, tell me that I fought the battle splendidly and that it was a masterpiece of art.” - George McClellan to his wife describing the battle of Antietam
User avatar
RebBugler
Reactions:
Posts: 4252
Joined: Sun Aug 03, 2008 12:51 am
Location: Ouachita Mountains, Arkansas

Re: Scripting

Post by RebBugler »

I like the toolbar off when courier screens open, that's a very good idea. However, I don't like the necessary double click to close and then get the toolbar back. I worked with this, tried 'close:togglehud' and some other combinations to make it happen with just clicking close, to no avail. Bet ADukes knows how, if it's possible.
Bugles & Flags Gettysburg - Toolbar, Flags, Scenarios, and More...
born2see
Reactions:
Posts: 1326
Joined: Fri Apr 22, 2011 9:25 am

Re: Scripting

Post by born2see »

I like the toolbar off when courier screens open, that's a very good idea. However, I don't like the necessary double click to close and then get the toolbar back. I worked with this, tried 'close:togglehud' and some other combinations to make it happen with just clicking close, to no avail. Bet ADukes knows how, if it's possible.


If it stumped somebody as skilled as yourself then I had no hope of figuring it out. There's no way I can see to trap the close event and do something when it happens.

I just spent a couple of hours with the SDK docs. IMHO the scenario portions of the game are thoroughly documented but the interface and appearance portions are not. We are left comb through the .csv and .ini files for clues as to how they work.
"Those in whose judgment I rely, tell me that I fought the battle splendidly and that it was a masterpiece of art.” - George McClellan to his wife describing the battle of Antietam
Post Reply