News:

Rings of Reznor!

Main Menu

JKC wrestles w/EZ Script

Started by JKCarrier, February 12, 2009, 05:01:00 PM

Previous topic - Next topic

JKCarrier

Hello friends, Captain Clueless is back for more help!  :lol:

This mission starts off with an initial encounter, and then three more encounters are supposed to start simultaneously. Two of the three are working, but the third, a Sabotage encounter, isn't starting. Here's the script (dialogue redacted to minimize spoilers):

Spoiler
Story: Asylum

#----------

Encounter: Inmates Running the Asylum
Type: Fight
Villains: arkhamthug
Minions: arkhamthug
Marker: encounter1
Next: Paging Doctor Howard, Paging Doctor Fine, Why I Oughtta

Alert Cutscene:
Yellow Arrow on Villain1
Camera on batgirl zoom 50 heading 135
batgirl says, "blah"
batgirl says, "blah"
batgirl says, "blah"

Start Cutscene:
Camera on Villain1
Villain1 turns to Minion1
Villain1 says, "blah"
Minion1 turns to Villain1
Minion1 says, "blah"
Villain1 says, "blah"
Cinematic camera on Villain1 to batgirl
batgirl turns to Villain1
batgirl says, "blah"
Minion1 turns to batgirl
Minion1 says, "blah"
Villain1 turns to batgirl
Villain1 says, "blah"
batgirl says, "blah"

End Cutscene:
Camera on batgirl
batgirl says, "blah"
batgirl says, "blah"

#----------

Encounter: Paging Doctor Howard
Type: Chat
Villains: arkhamthug
Minions: arkhamthug
Allies: arkhamdoc
Marker: howard1
Next: None

Alert Cutscene:
Yellow Arrow on Ally1

Start Cutscene:
Cinematic Camera on Villain1 to Ally1
Villain1 turns to Ally1
Villain1 says, "blah"
Ally1 turns to Villain1
Ally1 says, "blah"
Minion1 turns to Ally1
Minion1 says, "blah"
Cinematic camera on batgirl to Villain1
batgirl turns to Villain1
batgirl says, "blah"

Chat Cutscene:
Remove arrow on arkhamdoc
Cinematic camera on Ally1 to batgirl
batgirl turns to Ally1
batgirl says, "blah"
Ally1 turns to batgirl
Ally1 says, "blah"
Ally1 says, "blah"
Ally1 says, "blah"
batgirl says, "blah"
Ally1 says, "blah"
batgirl says, "blah"

#----------

Encounter: Paging Doctor Fine
Type: Rescue Caged
Allies: arkhamdoc
Villains: arkhamthug
Minions: arkhamthug
Marker: fine1
Next: None

Alert Cutscene:
Yellow Arrow on Ally1

Start Cutscene:
Cinematic camera on Villain1 to Ally1
Ally1 turns to Villain1
Ally1 says, "blah"
Villain1 turns to Ally1
Villain1 says, "blah"
Cinematic camera on Minion1 to batgirl
Minion1 turns to batgirl
Minion1 says, "blah"

End Cutscene:
Remove arrow on arkhamdoc
Cinematic camera on batgirl to Ally1
batgirl turns to Ally1
batgirl says, "blah"
Ally1 turns to batgirl
Ally1 says, "blah"
Ally1 says, "blah"
Ally1 says, "blah"
batgirl says, "blah"
Ally1 says, "blah"
batgirl says, "blah"
Ally1 says, "blah"

#----------

Encounter: Why I Oughtta
Type: Sabotage
Villains: arkhampyro
Minions: arkhamthug
Objects: ger_barrel
Marker: pyro1
Next: None

Alert Cutscene:
Yellow arrow on Object1

Start Cutscene:
Camera on Villain1
Villain1 turns to Object1
Villain1 says, "blah"
Minion1 turns to Object1
Minion1 says, "blah"
Villain1 says, "blah"
Cinematic camera on batgirl to Villain1
batgirl turns to Villain1
batgirl says, "blah"
Villain1 turns to batgirl
Villain1 says, "blah"

Sabotage Cutscene:
Camera on batgirl
batgirl says, "blah"

End Cutscene:
Camera on batgirl
batgirl says, "blah"
batgirl says, "blah"

#----------

Encounter: The Joke's On You
Type: Chat
Allies: joker
Villains: teneyedman
Minions: arkhamthug
Starts When: Paging Doctor Howard at End, Paging Doctor Fine at End, Why I Oughtta at End
Marker: joker1
Next: The Gang's All Here

Alert Cutscene:
Camera on batgirl
Play sound fx_thug_gun_2 at batgirl
Play sound fx_thug_gun_2 at batgirl
Play sound fx_thug_gun_2 at batgirl
batgirl turns to teneyedman
batgirl says, "gunshots!"
Yellow Arrow on joker

Start Cutscene:
Camera on teneyedman
teneyedman turns to joker
teneyedman plays animation ranged_4
teneyedman says, "blah"
joker turns to teneyedman
joker plays animation stunned
joker says, "blah"
batgirl says, "blah"
teneyedman turns to batgirl
teneyedman says, "blah"
joker turns to batgirl
joker says, "blah"
joker says, "blah"

End Cutscene:
Remove arrow on joker
batgirl turns to joker
batgirl says, "blah"
joker turns to batgirl
joker says, "blah"
joker says, "blah"
batgirl says, "blah"
joker says, "blah"
joker says, "blah"
batgirl says, "blah"
joker says, "blah"
joker says, "blah"
batgirl says, "blah"
batgirl says, "blah"
joker says, "blah"
joker plays animation ranged_2
joker says, "blah"

#----------

Encounter: The Gang's All Here
Type: Campaign Recruit
Allies: joker
Villains: teneyedman, arkhamthug, arkhampyro
Next: End

#----------

"Why I Oughtta" is the encounter that isn't starting. Here's the script.log:

Spoiler
>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
Starting ffx.py v. 3.3.1 build 0; branch = main release update
Loading m25ai.py v. 3.3.0 build 3; branch = Gold v.3.3 with Patch
importing missionobjvar.py v1.20
importing MLOG Reader 1.0.23
loading datfiles version 0.256000
Starting General Utilities 1.0.1
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
Loading m25cutscene.py v.3.2.0 final; May 27, 2007
CustomHeadCurrentTime 1291234931.482000
Starting Height Check module 1.4
Starting System Utilities 1.5
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
Loading m25aiopt.py v.3.2.0 final; branch = swingman 4
FFX Mission Plugin 'firehydrant' 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     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
Loading m25enc.py v.3.2.0 July 27, 2008
FFX Mission Plugin 'm25enc_opendoor' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
Loading m25pstory.py v.3.2.0 final; May 27, 2008
>>> C:\Users\J. Kevin Carrier\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\mission.py executed
! GetMapInfo
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'BF005_ASYLUM'
initialising FFX: skirmish=0
mapinfocaliper0 is not a valid explosion object
mapinfocaliper1 is not a valid explosion object
mapinfocaliper2 is not a valid explosion object
mapinfocaliper3 is not a valid explosion object
storing batgirl1: id_1,67
m25obj_2 arkhamthug encounter1_minion1
m25obj_4 arkhamthug encounter1_villain1
addArrow m25obj_4arrow m25obj_4 1 1
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))
clearCarrierRegistration: clearing attribute 'speedincreasetothrowbatgirl1' for destroyed object 'mapinfocaliper0'
clearCarrierRegistration: clearing attribute 'energisetograpplebatgirl1' for destroyed object 'mapinfocaliper0'
clearCarrierRegistration: clearing attribute 'speedincreasetothrowbatgirl1' for destroyed object 'mapinfocaliper1'
clearCarrierRegistration: clearing attribute 'energisetograpplebatgirl1' for destroyed object 'mapinfocaliper1'
clearCarrierRegistration: clearing attribute 'speedincreasetothrowbatgirl1' for destroyed object 'mapinfocaliper2'
clearCarrierRegistration: clearing attribute 'energisetograpplebatgirl1' for destroyed object 'mapinfocaliper2'
clearCarrierRegistration: clearing attribute 'speedincreasetothrowbatgirl1' for destroyed object 'mapinfocaliper3'
clearCarrierRegistration: clearing attribute 'energisetograpplebatgirl1' for destroyed object 'mapinfocaliper3'
initAttribsForChar: working on batgirl1 (batgirl)
initAttribsForChar (batgirl): looking at attribute wall climbing
initAttribsForChar (batgirl): looking at attribute cybernetic brain
initAttribsForChar (batgirl): looking at attribute heroic
initAttribsForChar (batgirl): looking at attribute ffqtracking
execInitAttrib: init ffqtracking attribute
    on batgirl1 of template batgirl (batgirl)
initAttribsForChar: working on m25obj_2 (arkhamthug)
initAttribsForChar (arkhamthug): looking at attribute timid
initAttribsForChar (arkhamthug): looking at attribute weak minded
initAttribsForChar: working on m25obj_4 (arkhamthug)
initAttribsForChar (arkhamthug): looking at attribute timid
initAttribsForChar (arkhamthug): looking at attribute weak minded
Plugin 'firehydrant' OnPostInit() called
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 'm25enc_opendoor' has no OnPostInit()
Plugin 'm25enc_simplechoice' has no OnPostInit()
Template_GetHeight() non-fatal error:
    template 'arkhamthug' not found in list of template heights.
    To detect approximate height, use
    checkHeight(templateList, precise = 'no', repeat = 0, replace = 0, giants = 1, campaign = 0)
m25obj_6 arkhamthug fine1_minion1
m25obj_8 arkhamthug fine1_villain1
m25obj_10 arkhamdoc fine1_ally1
m25obj_12 nazihq_killarilla_cage (-733.896972656, 593.961975098, 2.05170989037)
addArrow m25obj_10arrow m25obj_10 1 1
ff.DoEncCustom(3,villains = ['arkhampyro'], minions = ['arkhamthug'], cutscenes = [['alertcs', [['priority', 1], ['replace', ['object1', 'object']], ['cutscene', "CS_AddArrow('object1arrow', 'object1', arrow_type=js.ARROW_YELLOW)"]]], ['startcs', [['priority', 1], ['replace', ['villain1', 'villain'], ['object1', 'object'], ['minion1', 'minion']], ['required', 'batgirl'], ['cutscene', 'CS_Start()', "CS_Camera('villain1', dist=-160, yaw=0)", "CS_TurnTo('villain1', 'object1')", "CS_Speak('villain1', 'some gasoline, a little fertilizer, a few odds and ends from the machine shop...', force=0)", "CS_TurnTo('minion1', 'object1')", "CS_Speak('minion1', 'fire! fire!', force=0)", 'CS_Speak(\'villain1\', "that\'s right, she\'s gonna blow up real good!", force=0)', "CS_CinematicCamera('batgirl','villain1')", "CS_TurnTo('batgirl', 'villain1')", 'CS_Speak(\'batgirl\', "i\'m no doctor, but let me guess: general sociopath with an extra helping of pyromania?", force=0)', "CS_TurnTo('villain1', 'batgirl')", "CS_Speak('villain1', 'you forgot violent tendencies and an irrational hatred of spandex. get her!', force=0)", 'CS_End()']]], ['sabotagecs', [['priority', 1], ['required', 'batgirl'], ['cutscene', 'CS_Start()', "CS_Camera('batgirl', dist=-160, yaw=0)", 'CS_Speak(\'batgirl\', "whew, this nut knows his munitions. i\'ve got to carefully remove the trigger mechanism...", force=0)', 'CS_End()']]], ['endcs', [['priority', 1], ['required', 'batgirl'], ['cutscene', 'CS_Start()', "CS_Camera('batgirl', dist=-160, yaw=0)", 'CS_Speak(\'batgirl\', "got it! it\'s harmless now.", force=0)', "CS_Speak('batgirl', 'i wonder what other surprises these nutjobs have in store...?', force=0)", 'CS_End()']]]], marker = 'pyro1', actions="villains fight heroes, allies fight villains, heroes sabotage object", objects = ['ger_barrel'], batgirlsays,"i'mnodoctor,butletmeguess = 'general sociopath with an extra helping of pyromania?"',return_function="StorylineEncounterReturn")
Traceback (innermost last):
  File "c:\program files (x86)\steam\steamapps\common\freedom force vs. the 3rd reich\.\batfam\missions\scripts\m25story.py", line 252, in DoStorylineStateEvent
    DoStorylineState(story, state, event.user)
  File "c:\program files (x86)\steam\steamapps\common\freedom force vs. the 3rd reich\.\batfam\missions\scripts\m25story.py", line 295, in DoStorylineState
    if not StorySetupEncounter(enc_id,story,state,a):
  File "c:\program files (x86)\steam\steamapps\common\freedom force vs. the 3rd reich\.\batfam\missions\scripts\m25story.py", line 385, in StorySetupEncounter
    val = eval('ff.%s(%i,%s,return_function="StorylineEncounterReturn")'%(encname,enc_id,encparams))
  File "<string>", line 1
    ff.DoEncCustom(3,villains = ['arkhampyro'], minions = ['arkhamthug'], cutscenes = [['alertcs', [['priority', 1], ['replace', ['object1', 'object']], ['cutscene', "CS_AddArrow('object1arrow', 'object1', arrow_type=js.ARROW_YELLOW)"]]], ['startcs', [['priority', 1], ['replace', ['villain1', 'villain'], ['object1', 'object'], ['minion1', 'minion']], ['required', 'batgirl'], ['cutscene', 'CS_Start()', "CS_Camera('villain1', dist=-160, yaw=0)", "CS_TurnTo('villain1', 'object1')", "CS_Speak('villain1', 'some gasoline, a little fertilizer, a few odds and ends from the machine shop...', force=0)", "CS_TurnTo('minion1', 'object1')", "CS_Speak('minion1', 'fire! fire!', force=0)", 'CS_Speak(\'villain1\', "that\'s right, she\'s gonna blow up real good!", force=0)', "CS_CinematicCamera('batgirl','villain1')", "CS_TurnTo('batgirl', 'villain1')", 'CS_Speak(\'batgirl\', "i\'m no doctor, but let me guess: general sociopath with an extra helping of pyromania?", force=0)', "CS_TurnTo('villain1', 'batgirl')", "CS_Speak('villain1', 'you forgot violent tendencies and an irrational hatred of spandex. get her!', force=0)", 'CS_End()']]], ['sabotagecs', [['priority', 1], ['required', 'batgirl'], ['cutscene', 'CS_Start()', "CS_Camera('batgirl', dist=-160, yaw=0)", 'CS_Speak(\'batgirl\', "whew, this nut knows his munitions. i\'ve got to carefully remove the trigger mechanism...", force=0)', 'CS_End()']]], ['endcs', [['priority', 1], ['required', 'batgirl'], ['cutscene', 'CS_Start()', "CS_Camera('batgirl', dist=-160, yaw=0)", 'CS_Speak(\'batgirl\', "got it! it\'s harmless now.", force=0)', "CS_Speak('batgirl', 'i wonder what other surprises these nutjobs have in store...?', force=0)", 'CS_End()']]]], marker = 'pyro1', actions="villains fight heroes, allies fight villains, heroes sabotage object", objects = ['ger_barrel'], batgirlsays,"i'mnodoctor,butletmeguess = 'general sociopath with an extra helping of pyromania?"',return_function="StorylineEncounterReturn")
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
SyntaxError: invalid token
m25obj_14 arkhamthug howard1_minion1
m25obj_16 arkhamthug howard1_villain1
m25obj_18 arkhamdoc howard1_ally1
addArrow m25obj_18arrow m25obj_18 1 1
initAttribsForChar: working on m25obj_14 (arkhamthug)
initAttribsForChar (arkhamthug): looking at attribute timid
initAttribsForChar (arkhamthug): looking at attribute weak minded
initAttribsForChar: working on m25obj_10 (arkhamdoc)
initAttribsForChar: working on m25obj_6 (arkhamthug)
initAttribsForChar (arkhamthug): looking at attribute timid
initAttribsForChar (arkhamthug): looking at attribute weak minded
initAttribsForChar: working on m25obj_8 (arkhamthug)
initAttribsForChar (arkhamthug): looking at attribute timid
initAttribsForChar (arkhamthug): looking at attribute weak minded
initAttribsForChar: working on m25obj_16 (arkhamthug)
initAttribsForChar (arkhamthug): looking at attribute timid
initAttribsForChar (arkhamthug): looking at attribute weak minded
initAttribsForChar: working on m25obj_18 (arkhamdoc)
clearCarrierRegistration: clearing attribute 'speedincreasetothrowbatgirl1' for destroyed object 'm25obj_4'
clearCarrierRegistration: clearing attribute 'energisetograpplebatgirl1' for destroyed object 'm25obj_4'
clearCarrierRegistration: clearing attribute 'speedincreasetothrowbatgirl1' for destroyed object 'm25obj_2'
clearCarrierRegistration: clearing attribute 'energisetograpplebatgirl1' for destroyed object 'm25obj_2'

Any ideas?

BentonGrey

I've only got time for a very quick look at the moment JKC, but this caught my eye:

SyntaxError: invalid token
m25obj_14 arkhamthug howard1_minion1
m25obj_16 arkhamthug howard1_villain1

I'm guessing that the game is choking on something related to your thugs or those markers.  I'm not entirely sure.
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/

BentonGrey

Arlight, after a bit more reflection, I think that Batgirl's dialog MIGHT be breaking the encounter.  Send me the unedited mission.txt, JKC.  In the meantime, though, it might be a good idea to double check the markers for that encounter.
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/

oldmanwinters

Quote from: BentonGrey on December 03, 2010, 07:08:21 AM
Arlight, after a bit more reflection, I think that Batgirl's dialog MIGHT be breaking the encounter.  Send me the unedited mission.txt, JKC.  In the meantime, though, it might be a good idea to double check the markers for that encounter.

I've tried messing around with EZscript, but it seems like my own attempts at original dialogue also tend to break encounters or prematurely end cutscenes.  Any tips?

BentonGrey

Haha, yeah, EZScript can be rather picky at times.  Check out the sample missions I posted on The Greylands: http://bentongrey.wordpress.com/2010/01/21/the-anatomy-of-an-ezscript-adventure/

That gives you some general advice, and there are a few more related stories there as well.  As for things specifically relating to dialog, there are a few rules that it is wise to follow.  First, always make sure to do your composing in the EZScript Editor.  It will make your life a thousand times easier.  Second, make sure that all the names and markers in your encounters are correct.  If you've got a line of dialog being spoken by Shredder, but Shredder isn't in that encounter, the game will choke.  Third, never use esoteric punctuation.  Stick with periods, commas, question marks, and exclamation points.  Don't use colons, semi-colons, or anything else in your dialog.  The same goes for underscores and other symbols.  Fourth, names are important, so make sure to simplify everything as much as possible.  If you're working with a built-in character called Awesome Guy the Unstoppable!!, then you'll want to simplify that, both for EZScript's sake, and your own.  The simpler something is, the easier it is to remember and check.  So, you'd want to change Awesome Guy's name to awesomeg, or something equally easy.  For built-ins you can always create a string entry that will give them a different display name anyway.

Feel free to post your EZScript drafts, Winters.  We'll be happy to look them over and give you some pointers. :)
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/

JKCarrier

Quote from: BentonGrey on December 03, 2010, 07:08:21 AM
Arlight, after a bit more reflection, I think that Batgirl's dialog MIGHT be breaking the encounter.  Send me the unedited mission.txt, JKC.  In the meantime, though, it might be a good idea to double check the markers for that encounter.

Thanks, I'll double-check the markers. What's your email?

JKCarrier

Quote from: BentonGrey on December 03, 2010, 05:19:47 PM
Don't use colons, semi-colons, or anything else in your dialog.

Which turned out to be my problem as well. Thanks for helping me sort it out, Benton!

BentonGrey

Awesome, so glad I could help JKC!  Feel free to bring me simple problems like that any old time, my friend.  Ha, mine are usually layered with about five problems like that, and maybe something inexplicable too! ;)  I just knew it had to be more complex.  I'm glad to hear it wasn't.

Hmm...I should do a new blog post about things NOT to do with EZScript, because things like adding in a colon or other symbol can cause tons of trouble, and no-one knows about it.
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/

John Jr.

Good idea, Benton. I had an entire cutscene go crazy because of a ":" in a sentence. EZScript is very sensitive about the way we write our speech lines.