• Welcome to Freedom Reborn Archive.
 

EZ Script Help with Rescue Fire

Started by hoss20, May 06, 2008, 12:31:36 PM

Previous topic - Next topic

hoss20

I've started writing a mod and have come across a small problem with my Rescue Fire encounter. The Ally Rescued Cutscene plays fine, but the Ally Congregates Cutscene doesn't. Also none of the If All Congregated, If None Congregated, or If Some Congregated cutsenes play. Here is my script: 
Story: The Protectors

#
# Put the story for you mission into here.
#


Encounter: City Fire
Type: Rescue Fire
Allies: fire_victim_01, fire_victim_02, fire_victim_03, fire_victim_04
Primary Objective: "Save the civilians" for 1000 prestige and 100 xp
Marker: encounter4

Alert Cutscene:
Red arrow on Allies

Start Cutscene:
Camera on ultra_ray
ultra_ray says, "We've got to get these people to safety."

Ally Congregates Cutscene:
Ally says, "I've made it to safety."

Ally Rescued Cutscene:
Ally says, "Thank you for saving me."

Next: If All Congregated: Success

Next: If None Congregated: Failure

Next: If Some Congregated: Partial Success

Encounter: Success
Type: Cutscene

Start Cutscene:
Camera on ultra_ray
ultra_ray says, "Good job, team."
poweron says, "Forgive me for saying this, but wasn't that a bit too easy for us?"
ultra_ray says, "We were sent for a reason. We should just be happy no one got hurt."

End Cutscene:
End

Encounter: Failure
Type: Cutscene

Start Cutscene:
Camera on ultra_ray
ultra_ray says, "We failed, gentlemen. I'll talk to the authorities. You head back to base."

End Cutscene:
End

Encounter: Partial Success
Type: Cutscene

Start Cutscene:
Camera on ultra_ray
ultra_ray says, "Our inexperience cost us. We couldn't save everyone."

End Cutscene:
End

Encounter: Next Mission
Type: Campaign Recruit
Villains: ultima

***********************************

   I'm sure I've messed up the EZ Script format, but I can't figure out where. Any help would be appreciated.

M25

The congregates cutscene should play.  Make sure you have the ezscript update found at http://ezscript.wikispaces.com/Plug-ins

I've tested your script and it looks like there is a bug in ezscript itself.  If you 'rescue' the people one right after the other, the fact that they were rescued doesn't register properly and the encounter won't end.  If you wait until one person starts moving before rescuing the next person it should work.  I'm looking into a fix for this issue.

Oh, and the Alert cutscene should have 'Red Arrow on Ally' not 'Red Arrow on Allies'


hoss20

Well, I changed my Rescue Fire Encounter to an Escort Encounter on the Fire map and it works pretty well. Now, I have another problem. I can't get the Allies Saved or Allies Lost cutscenes to play in the next encounter. My script is about as simple as I can make it, but I can't get it to work. Here's the script:
Story: The Protectors

#
# Put the story for your mission into here.
#


Encounter: Trouble at the Park
Type: Fight
Villains: ultima
Primary Objective: "Defeat ultima" for 5000 prestige and 500 xp
Marker: encounter1

Alert Cutscene:
Unfade for 2 seconds
Red arrow on ultima
ultima says, "So they've sent me some heroes to play with."
Camera on Hero
Hero says, "Be careful, gang. He's a big one."

Start Cutscene:
Remove arrow from ultima
Hero says, "Let's get him!"

Allies Saved Cutscene:
Hero says, "I can't believe we beat this guy."

Allies Lost Cutscene:
Camera on ultima
ultima says, "That will teach you to deal with the power of Ultima!"

End Cutscene:
End
****************************

Again, any help would be appreciated. I know I've done something stupid, but can't for the life of me figure out what it is.


GogglesPizanno

Well the obvious thing that jumps out at me initially is that you haven't defined any allies.  :rolleyes:

hoss20

That's what I thought, but I used FFedit to place my heroes. I want to use mandatory heroes during this encounter. Whenever I define allies and set up mandatory heroes during an encounter, I end up with two sets of heroes. Is there a way to set up required heroes through EZ script? Campaign Recruit and Campaign Add Heroes only add heroes to select, they don't make heroes mandatory.

GogglesPizanno

The characters you are controlling (the ones you select before a mission) are different than allies.
I dont think there are any ways to set up required heroes in EZScript.

Normally you would do this on the campaign tab of ffedit. So you'd select your mission in the list, then select the "required heroes" from the first list (the characters a player HAS to use) and then select the "disallowed heroes" from the bottom list (characters that are greyed out and non selectable by the player). The only time you would have to place the characters on a map instead of letting players select them at the selection screen would be on the first mission of a campaign.

Now if you are trying to have a mission where all your playable characters have to survive, M25 did write a "required character" plug in that should allow that (I haven't tried it so I dont know if it will do exactly what you want). You can get that here: http://ezscript.wikispaces.com/Plug-ins

Boalt92

Another thing you can do is name your allies:

"placed_hero_xx named placed_hero_xx"

This will tell EZ script to use the hero on the map instead of spawning a new one.

B92

hoss20

Actually my player characters are supposed to lose this encounter. I tried defining a couple of allies and I still get the same problem of no cutscenes playing at the end of the fight.

M25

Can we see your revised encounter and the script.log?   

hoss20

Here's the encounter:
Story: The Protectors

#
# Put the story for your mission into here.
#


Encounter: Trouble at the Park
Type: Fight
Villains: ultima
Allies: civilian_male, civilian_female
Primary Objective: "Defeat ultima" for 5000 prestige and 500 xp
Marker: encounter1

Alert Cutscene:
Unfade for 2 seconds
Red arrow on ultima
ultima says, "So they've sent me some heroes to play with."
Camera on Hero
Hero says, "Be careful, gang. He's a big one."

Start Cutscene:
Remove arrow from ultima
Hero says, "Let's get him!"

Allies Saved Cutscene:
Hero says, "I can't believe we beat this guy."

Allies Lost Cutscene:
Camera on ultima
ultima says, "That will teach you to deal with the power of Ultima!"

End Cutscene:
End

Here's the script.log
[spoiler]
>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
Starting ffx.py v. 3.2.2 build 1; branch = Gold v.3.2.2
Loading m25ai.py v. 3.2.2 build 1; branch = tmx branch for FFX 3.2.2
importing missionobjvar.py v1.18
loading datfiles version 0.251000
importing MLOG Reader 1.0.19 for FFX3.2.2
Starting General Utilities 1.0
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
CustomHeadCurrentTime 1211839532.630000
Starting Height Check module 1.4
Starting System Utilities 1.4
OBJECTS_HEIGHT: 604 entries
NIF_OBJECTS: 482 entries
BUILDINGS_IN_OBJECTS_DAT: 30 entries
BUILDING_DIMENSIONS: 30 entries
Starting skXMapInfo.py  v 0.79 beta
skXMapInfo: m25ai available
FFX Mission Plugin 'firehydrant' imported
FFX Mission Plugin 'irradiateradius' imported
FFX Mission Plugin 'zombie' imported
Loading freeroam_keepbuildingdamage.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'freeroam_keepbuildingdamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_power' imported
Loading m25freeroam.py v. 3.2.0 build 7; branch = m25 branch 1
FFX Mission Plugin 'm25encexit' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_opendoor' imported
FFX Mission Plugin 'm25enc_reqchar' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
FFX Mission Plugin 'm25encstory' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
>>> C:\Documents and Settings\Tod\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\mission.py executed
! GetMapInfo
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
Building_GetDimensions() non-fatal error:
    template 'building' not found in list of building dimensions.
    To detect approximate dimensions, use
    getBuildingDimensions ()
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = '005_TROUBLE_AT_THE_PARK'
initialising FFX: skirmish=0
mapinfocaliper3 is not a valid explosion object
mapinfocaliper2 is not a valid explosion object
mapinfocaliper0 is not a valid explosion object
mapinfocaliper1 is not a valid explosion object
storing hero_1: id_1,105
storing hero_2: id_2,152
storing hero_3: id_3,192
storing hero_4: id_4,37
initialising FFQ_initialiseExtras()
FFX_UpdateSun: getting default sun
FFX_UpdateSun: setting = (-45.0, 45.0, 1.0, 0.800000011921, (1.0, 1.0, 1.0))
addArrow ultimaarrow m25obj_2 0 1
initAttribsForChar: working on m25obj_4 (civilian_male)
initAttribsForChar: working on m25obj_6 (civilian_female)
initAttribsForChar: working on m25obj_2 (ultima)
initAttribsForChar (ultima): looking at attribute invulnerable2
execInitAttrib: init invulnerable2 attribute
    on m25obj_2 of template ultima (ultima)
initAttribsForChar (ultima): looking at attribute fast healing
initAttribsForChar (ultima): looking at attribute strange visitor
initAttribsForChar (ultima): looking at attribute unbeliever
initAttribsForChar (ultima): looking at attribute ffqlongjumper
execInitAttrib: init ffqlongjumper attribute
    on m25obj_2 of template ultima (ultima)
initAttribsForChar: working on hero_2 (spectrone)
initAttribsForChar (spectrone): looking at attribute flier
initAttribsForChar (spectrone): looking at attribute lightcontrol
execInitAttrib: init lightcontrol attribute
    on hero_2 of template spectrone (spectrone)
initAttribsForChar (spectrone): looking at attribute fastflier
execInitAttrib: init fastflier attribute
    on hero_2 of template spectrone (spectrone)
initAttribsForChar: working on hero_3 (the_expert)
initAttribsForChar (the_expert): looking at attribute acrobatic
execInitAttrib: init acrobatic attribute
    on hero_3 of template the_expert (the_expert)
initAttribsForChar (the_expert): looking at attribute nimble
initAttribsForChar (the_expert): looking at attribute combatskill
execInitAttrib: init combatskill attribute
    on hero_3 of template the_expert (the_expert)
initAttribsForChar: working on hero_4 (vortex)
initAttribsForChar (vortex): looking at attribute bulktp
execInitAttrib: init bulktp attribute
    on hero_4 of template vortex (vortex)
initAttribsForChar (vortex): looking at attribute groupteleport
execInitAttrib: init groupteleport attribute
    on hero_4 of template vortex (vortex)
initAttribsForChar: working on hero_1 (bracer)
initAttribsForChar (bracer): looking at attribute flier
initAttribsForChar (bracer): looking at attribute guardianp
execInitAttrib: init guardianp attribute
    on hero_1 of template bracer (bracer)
Plugin 'firehydrant' OnPostInit() called
Plugin 'irradiateradius' has no OnPostInit()
Plugin 'zombie' has no OnPostInit()
Plugin 'freeroam_keepbuildingdamage' OnPostInit() called
Plugin 'm25ai_lowjumper' has no OnPostInit()
Plugin 'm25ai_realitymanipulation' has no OnPostInit()
Plugin 'cutscene_power' has no OnPostInit()
Plugin 'm25encexit' has no OnPostInit()
Plugin 'm25enc_opendoor' has no OnPostInit()
Plugin 'm25enc_reqchar' has no OnPostInit()
Plugin 'm25enc_simplechoice' has no OnPostInit()
Plugin 'm25encstory' has no OnPostInit()
[/spoiler]
Thanks for the help.

M25

Grab EZ script update 2 at

http://ezscript.wikispaces.com/Plug-ins


It will fix the problem with the cutscenes (and it fixes the issue you were having with the fire encounter as well).


I should also point out that
End Cutscene:
End

doesn't do anything.   End is not a valid cutscene command (it gets ignored).


hoss20

That update did the trick, M25. Thank you so much.