Decompiling Challenge Scripts

it seems you guys have working those alright. The last few were problems but i managed to work, 3.1.1 its 'set anim events probability to NUMBER' so it doesnt take a variable. And the 'with' goes at the end of formation statement but a parse comes up like there's more to it.
 
Daxter said:
the 'with' goes at the end of formation statement but a parse comes up like there's more to it.

Ya. I tried "with 100 men and 0 women" but it didn't like that. :)

Also. Just to mention. The trigger floaty number doesn't accept icons.
Code:
    20 000015	Source line: trigger floaty number ENUMERATION at {POSITION} importance NUMBER value NUMBER //3.16.22
    20 000015	push     4D2h <- ENUM = hex for 4321
    20 000016	pushvo   POSITION <- Position
    20 000017	engcall  93h <- part of Position
    20 000018	pushf    1234.000f ->Number
    20 000019	pushf    1234.000f -> Number
    20 00001A	pushf    1.000f -> Unknown Number
    20 00001B	pushf    1.000f -> Unknown Number
    20 00001C	pushf    1.000f -> Unknown Number
    20 00001D	engcall  Dh -> Goes to the engine.
If it accepted an icon there'd be a "push 0h" in there for the ENUM it needed.

Edit: Conditions compiled fine other than:

Code:
//if VARIABLE can view camera end if
//if ENUMERATION music played end if
//if say sound "HELP_TEXT_DEFINITELY_NEWEST_INTRO_01" playing end if
 
Might want to lengthen the edit time Kay. :p

Here is my updated list.

Statements
Code:
//disable VARIABLE visible //3.3.1
//set platoon VARIABLE formation to NUMBER wide by NUMBER deep //3.18.25
//set platoon stat ENUMERATION of VARIABLE to NUMBER //3.18.26
//send random spirit home
//move camera to ENUMERATION ENUMERATION 
//set camera roll to {POSITION} time 5 catmullrom bias 1.0 tension 2.0
//set camera roll to {POSITION} time 5 catmullrom bias 1.0 tension 2.0

Conditions
Code:
//if VARIABLE can view camera end if
//if ENUMERATION music played end if
//if say sound "HELP_TEXT_DEFINITELY_NEWEST_INTRO_01" playing end if

Expressions
Code:
//VARIABLE100 = get idle platoons in town VARIABLE
//VARIABLE102 = get town VARIABLE platoon type ENUMERATION at ratio NUMBER
//VARIABLE103 = get villagers of tribe ENUMERATION nearest {POSITION} radius NUMBER
//VARIABLE105 = get platoon stat ENUMERATION of VARIABLE
//VARIABLE106 = get movement stat ENUMERATION of VARIABLE

And that leaves Positions, Constants and Objects. :)
 
i've just changed your member group. You should be able to edit your own posts now.

I'm going to out of town for several days and won't be able to help until I return.
 
If that is a list of non working things here are a few fixed up.

//set camera roll to {POSITION} time 5 catmullrom bias 1.0 tension 2.0
set camera roll NUMBER time NUMBER catmullrom bias NUMBER tension NUMBER
->> doesn't accept a position

//move camera to ENUMERATION ENUMERATION
move camera to CONSTANT CONSTANT time NUMBER
->> needs to have 'time'

As for the others and the trigger floaty one I get started on them straight away no matter how long it takes.
 
Daxter said:
If that is a list of non working things here are a few fixed up.

//set camera roll to {POSITION} time 5 catmullrom bias 1.0 tension 2.0
set camera roll NUMBER time NUMBER catmullrom bias NUMBER tension NUMBER
->> doesn't accept a position

//move camera to ENUMERATION ENUMERATION
move camera to CONSTANT CONSTANT time NUMBER
->> needs to have 'time'

As for the others and the trigger floaty one I get started on them straight away no matter how long it takes.

I was just stating that the floaty didn't accept an icon. :p

If I can get a command to compile it'll tell me all the parameters it wants to pass to the engine.

As for the camera roll. 2 different commands.

3.31.37 set camera roll expression time expression easein expression easeout expression
Sets the camera roll in an optional amount of time, with easein and easeout parameters.
set camera roll 132.1 time 5 easein 2.2 easeout 1.6

3.31.38 set camera roll to position time expression catmullrom bias expression tension expression
Sets the camera roll from the initial position to the given position over the given time and with the various spline expressions
set camera roll to {MyPos} time 5 catmullrom bias 1.0 tension 2.0
 
Statements
Code:
//disable VARIABLE visible //3.3.1
//set platoon VARIABLE formation to NUMBER wide by NUMBER deep //3.18.25
//set platoon stat ENUMERATION of VARIABLE to NUMBER //3.18.26

Conditions
Code:
//if VARIABLE can view camera end if
//if ENUMERATION music played end if

Expressions
Code:
//VARIABLE103 = get villagers of tribe ENUMERATION nearest {POSITION} radius NUMBER
//VARIABLE105 = get platoon stat ENUMERATION of VARIABLE
//VARIABLE106 = get movement stat ENUMERATION of VARIABLE

Constants
Code:
//   1. Constant Manipulation
//ENUMERATION from ENUMERATION to ENUMERATION 
//ENUMERATION NUMBER

Object
Code:
//VARIABLE2 = create highlight ENUMERATION for "BW2T_SCRIPT_06FINAL_CHALLENGE_FOREST_AMBUSH_60" at {POSITION}
//VARIABLE9 = address of VARIABLE
//VARIABLE58 = marker at ENUMERATION
//VARIABLE94 = get idle platoon of tribe nearest {POSITION} radius NUMBER
//VARIABLE95 = get platoon of type nearest {POSITION} radius NUMBER
//VARIABLE96 = get platoon of type tribe nearest {POSITION} radius NUMBER
//VARIABLE98 = get idle platoon of type nearest {POSITION} radius NUMBER
//VARIABLE101 = get platoon on wall of type nearest {POSITION} radius NUMBER
//VARIABLE107 = get idle platoon type ENUMERATION of town VARIABLE
//VARIABLE113 = get living villager at {POSITION}

And this is it. These are the all the API commands that I can't get to compile. If Lionhead didn't use them then there's nothing to worry about. If they did then there'll be some unknown spots in the decompiled scripts.
 
Here's a few more. Haven't quite looked at all of them yet.

Objects

//VARIABLE101 = get platoon on wall of type nearest {POSITION} radius NUMBER
VARIABLE101 = get platoon on wall of type ENUMERATION nearest {POSITION} radius NUMBER

//VARIABLE98 = get idle platoon of type nearest {POSITION} radius NUMBER
VARIABLE98 = get idle platoon of type ENUMERATION nearest {POSITION} radius NUMBER

//VARIABLE96 = get platoon of type tribe nearest {POSITION} radius NUMBER
VARIABLE96 = get platoon of type tribe ENUMERATION nearest {POSITION} radius NUMBER

//VARIABLE95 = get platoon of type nearest {POSITION} radius NUMBER
VARIABLE95 = get platoon of type ENUMERATION nearest {POSITION} radius NUMBER

//VARIABLE94 = get idle platoon of tribe nearest {POSITION} radius NUMBER
VARIABLE94 = get idle platoon of tribe ENUMERATION nearest {POSITION} radius NUMBER

//VARIABLE18 = get non-poisoned ENUMERATION in VARIABLE
VARIABLE18 = get not poisoned ENUMERATION in VARIABLE

//VARIABLE10 = variable array
VARIABLE10 = VARIABLE[NUMBER]

Statements

//send random spirit home
is either "send good spirit home" or "send evil spirit home"  (only valid in cinema blocks)

//move camera to ENUMERATION ENUMERATION
move camera to ENUMERATION ENUMERATION time NUMBER
 
set camera roll VARIABLE time NUMBER catmullrom bias NUMBER tension NUMBER  :woot
 
Hunter. These are the functions that are left (ie used in the retail scripts)

Code:
engcall  93h	Brackets for POSITION
engcall  7h	SirenSpell.txt[SirenSpell(EnemyWonder,Siren)] & VolcanoSpell.txt[VolcanoSpell(EnemyWonder,Volcano)] & EarthquakeSpell.txt[EarthquakeSpell(EnemyWonder,Earthquake)] & HurricaneSpell.txt[HurricaneSpell(Hurricane)] & Land specific epic spells (probably AI related).
engcall  8Ch	Used
engcall  98h	Used
engcall  9Ah	Begin Cinema/Fullscreen
engcall  9Bh	End Cinema/Fullscreen
engcall  9Ch	Begin/End Cinema
engcall  EFh	Begin Cinema/Interactive Cinema/Dialogue/Fullscreen
engcall  F0h	End Cinema/Interactive Cinema/Dialogue/Fullscreen
engcall  F4h	Begin Cinema/Interactive Cinema/Fullscreen
engcall  F5h	End Cinema/Interactive Cinema/Fullscreen
engcall  2B9h	Land4UndeadLegion.txt [GL_GhostSuccessOutro]
engcall  315h	Used
engcall  317h	Used
engcall  32Ah	Used
engcall  34Fh	Begin Interactive Cinema
engcall  350h	End Interactive Cinema
engcall  3F2h	Land9AztecCapitalScript.txt[LC9_FireEpic(TargetPlatoon)] & Land7JapanCapital.txt[Land7JapanArmyManager]
engcall  3F5h	Reminders.txt[StandardReminder(AdvisorSpeak)]
engcall  5Fh	Land3Globals.txt[Land3Globals]
engcall  2Eh	Reminders.txt[StandardBanter(AdvisorGroupID)]
engcall  Dh	Land3PaternitySuit.txt[PS_Hearts(House) ]
 
//begin full screen cinema
//end full screen cinema

begin fullscreen cinema
end cinema


In Constants:

10.2.20 get town object method of last conversion
returns the last method of conversion for the given town (see lastcaptureenum.h)

TownConversion = get town JapTown method of last conversion

Compiles but doesn't work.

TownConversion = variable get town JapTown method of last conversion

Does complie and work properly

Expressions

//VARIABLE100 = get idle platoons in town VARIABLE
VARIABLE100 = get platoons in town VARIABLE

//VARIABLE102 = get town VARIABLE platoon type ENUMERATION at ratio NUMBER
VARIABLE102 = get town VARIABLE platoon type ENUMERATION ratio

 
Statements
Code:
//disable VARIABLE visible //3.3.1 // looking for a "[disable][enable] " probably physics or tracking or somesuch
//set platoon VARIABLE formation to NUMBER wide by NUMBER deep //3.18.25 // looking for a "with "

Conditions
Code:
//if VARIABLE can view camera end if // Looking for a whole slew of things. I got to "{POSITION} position across */down *" before it crapped out

Expressions
Code:
//VARIABLE103 = get villagers of tribe ENUMERATION nearest {POSITION} radius NUMBER

Object
Code:
//VARIABLE9 = address of VARIABLE
//VARIABLE58 = marker at ENUMERATION

Updated.
 
set platoon value CR_NONE of MyVar to 0

MyVar = get movement value CR_NONE of MyVar
MyVar = get platoon value CR_NONE of MyVar
MyVar = marker at {0,0,0}

:woot
 
Hunter said:
set platoon value CR_NONE of MyVar to 0

MyVar = get movement value CR_NONE of MyVar
MyVar = get platoon value CR_NONE of MyVar
MyVar = marker at {0,0,0}

:woot

How did you pull the "value" out? Just use "get platoon" and see what it wanted next?

Also
marker at POSITION //8.7.1
marker at ENUMERATION  //8.7.2 This is the one I need. :p

Also also, Those still weren't used in the retail scripts. Now we have more unknowns than commands left. XD

Code:
engcall  7h	SirenSpell.txt[SirenSpell(EnemyWonder,Siren)] & VolcanoSpell.txt[VolcanoSpell(EnemyWonder,Volcano)] & EarthquakeSpell.txt[EarthquakeSpell(EnemyWonder,Earthquake)] & HurricaneSpell.txt[HurricaneSpell(Hurricane)] & Land specific epic spells (probably AI related).
engcall  8Ch	Possibly CS block
engcall  98h	Possibly CS block
engcall  2B9h	Land4UndeadLegion.txt [GL_GhostSuccessOutro]
engcall  317h	Possibly CS block
engcall  32Ah	Possibly CS block
engcall  3F5h	Reminders.txt[StandardReminder(AdvisorSpeak)]
engcall  2Eh	Reminders.txt[StandardBanter(AdvisorGroupID)]
engcall  Dh	Land3PaternitySuit.txt[PS_Hearts(House) ]
 
To define a position as a variable, we have to use "MyVar = marker at {0,0,0}"

marker at ENUMERATION   //8.7.2 This is the one I need

VARIABLE = marker at camera position

This does complile, but I don't know if it's correct.

Did the floaty numbers one get solved?

 
//disable VARIABLE visible //3.3.1 // looking for a "[disable][enable] " probably physics or tracking or somesuch
disable VARIABLE visible disable VARIABLE pulse
-> makes sense since it's in referance to a visual effect


The rest I still can't get.

//set platoon VARIABLE formation to NUMBER wide by NUMBER deep //3.18.25 // looking for a "with "

I can get it as far as "set platoon VARIABLE formation to NUMBER wide by NUMBER deep with NUMBER" but can find anything to follow. Using troops, Members, Villagers gives a parser error. But I think that the number of troop in the formation needs to be defined since it's a set value. 3X4=12 and if there's more than 12 in the platoon..

//if VARIABLE can view camera end if // Looking for a whole slew of things. I got to "{POSITION} position across */down *" before it crapped out

Same here and it doesn't make sense. ???

//VARIABLE103 = get villagers of tribe ENUMERATION nearest {POSITION} radius NUMBER

Following the errors I end up with this and I doubt that it's correct.

Variable = get number of type TRIBE_TYPE_AZTEC in oTown
 
Kays said:
//disable VARIABLE visible //3.3.1 // looking for a "[disable][enable] " probably physics or tracking or somesuch
disable VARIABLE visible disable VARIABLE pulse
-> makes sense since it's in referance to a visual effect

Thats funny that you got that to run. It combined two commands.

Code:
    23 00000E	Source line: disable VARIABLE visible disable VARIABLE pulse
    23 00000E	pushb    false
    23 00000F	pushvo   VARIABLE
    23 000010	engcall  1Eh
    23 000011	pushb    false
    23 000012	pushvo   VARIABLE
    23 000013	pushf    1.000f
    23 000014	pushf    -1.000f
    23 000015	engcall  12h

call 1E is new
call 12 is
[disable][enable] VARIABLE pulse speed NUMBER1 with fadetime NUMBER2

//VARIABLE103 = get villagers of tribe ENUMERATION nearest {POSITION} radius NUMBER

Following the errors I end up with this and I doubt that it's correct.

Variable = get number of type TRIBE_TYPE_AZTEC in oTown

Not correct.

get number of type ENUMERATION in VARIABLE = 12.20.3
I need 12.19.10

Though I wouldn't worry about it. I doubt these last remaining commands are used in the retail scripts.
 
Thats funny that you got that to run. It combined two commands.

A visual effect has two properties. Visibility and pulse. This will allow you stop either or both.
 
Kays said:
A visual effect has two properties. Visibility and pulse. This will allow you stop either or both.

True. But pulse had it's own command already. Seems redundant. But Thank you.
 
Back
Top