News:

Happy 20th, FFvT3R!

Main Menu

JLA/AVengers Mod EZscript help

Started by JLAfan2001, March 26, 2009, 05:42:08 PM

Previous topic - Next topic

JLAfan2001

I want to try and make a 1983 jla/avengers mod. I'm starting this thread to ask for help. I have a few questions about EZscript and what it can or can't do.

1) How does EZscript know what maps you want to use for an ecounter. Can you tell EZscript which ones to use and how do I do that?
2) I have five characters I want to use in an encounter. The player will choose four. How can I tell EZscript that the computer will play the fifth character?
3) I also want to give the player the option to choose between two teams in an encounter. Example, if he chooses JLA, the computer will play avengers or vice versa. They are specific teams. Example batman, hawkman, zatanna vs captain america, starfox, scarlet witch. I would like to leave out the other members of both teams as a choice in some encounters because the individual teams are specific to the story. Is possible to write in these types of choices in EZscript?

That's what I have to start. Any help would be appreciated. Please keep in mind that I'm new to this and don't really know a heck of alot. I am hoping that things can be explained on a step by step basis rather than in general answers. Thanks.

M25

1.  If you are making a campaign, then you set up a directory for each mission with the map and the EZ script story that you want and then go to the campaign tab in FFEdit and set up the order in which you want the missions to play.

2. This would require a new plug-in for EZ script.  If you are serious, I can provide it.

3. You can use a Simple Choice encounter to give the player the option to choose between the two teams, and then run the other encounters based on that choice.

Encounter: Choose
Type: Simple Choice
Choice1: jla
Choice2: avengers
Allies: watcher
Next: If jla: Do JLA
Next: If avengers: Do Avengers

Start Cutscene:
watcher says, 'Choose, mortal.'

jla cutscene:
watcher says, "you have chosen the jla."

avengers cutscene:
watcher says, "you have chosen the avengers."


Encounter: Do JLA
...

Ecounter: Do Avengers
...


JLAfan2001

Thanks for the response, M25. I would like to make it a campaign and will try what you suggested although I suspect I may need help doing it. I am serious about trying to make it but I think it will be ALOT of trial and error. If you can make that plug-in, that would be great. I'm sure other will benefit from it as well. Also, speaking of maps, the first mission I would like to do is outside the avengers mansion. I know Tommyboy made a huge map of New York with the mansion in it. Is there a way to extract that mansion and place it into a smaller city map? If so, How can it be done? This will be one of the missions that the player will choose four characters and the computer will play the remaining characters. In this case it will be just one but the next mission will possibly be five that the computer will play in additon to the player's four.


style

This sounds tight!!! :thumbup: When you get the Campaign together can you send it my way please! ^_^
The Ultimate Fan!

M25

Well, you could ask tommyboy for the building you want.  Otherwise, you can look for it in the art/library subdirectory of tommyboy's map mod.  Or, you can grab the install creator from the ezscript.wikispaces.com site and use it to extract the building.

tommyboy

The mansion is in:
maps\art\library\area_specific\city\buildings\avengers_mansion\

And create a template for it (I usually just copy an existing building then rename the copy and point the mesh path to the new building).

JLAfan2001

#6
Thanks, guys. I will have to try that in the next couple of days. In the meantime, below is a rough draft of the first starting cutscene. I am using EZscripteditor and I noticed that the character names are in red. It doesn't seem to recognize them so I'm guessing I missed a step. The characters involved in the fight would be beast, she-hulk, hawkeye and captain marvel. Part of the encounter will be to rescue starfox. I also noticed that EZscripteditor doesn't include a line for the heroes and villains. Do I have to edit them in? I would also like to ask if someone can make a chronal egg object for this mod? Right now this just script writing. When I am able to get the Avengers mansion, I'm sure I will have questions about adding characters to the map. Let me know what you guys think.

Story: justice league of america vs the avengers

Encounter: Starting Cutscene
Type: Cutscene
Allies: starfox

Start Cutscene:
Camera on kang zoom 100.0 heading 100.0
kang says, "Here we are. The home of my accursed foes......The Avengers. It is beneath me to ask for their help but ask I must or all of existence will be erased. Including my own."
starfox says, "I don't know what you are doing here but you speak the truth about one thing. Your existence is in trouble."
Cinematic camera on kang to starfox
kang says, "I did not come to fight, Avenger but I would be more than willing to strike you down if I must."
kang plays animation ranged_2
starfox says, "AAAAAHHH!!!!!"
Cinematic camera on starfox to beast
beast says, "That scream. It sounded like starfox."
Cinematic camera on beast to captain marvel
captain marvel says, "It came from the direction of the garden. We must investigate at once."

M25

First you need to make sure you have all of those characters, either in the game files, or as hero files.

Next, you have to place them on the map, or tell EZ script to include them in the encounter.

Encounter: Starting Cutscene
Type: Cutscene
Allies: starfox, captain marvel, beast
Villains: kang

...


Now, if captain marvel and beast are supposed to be the player's character, then you don't need to include them

Allies: starfox
Villains: kang


JLAfan2001

I have hero files for all the characters involved. They are in the local settings\application data\irrational games\FFvTTR\custom\heroes folder. I also have the M25.ai files there too. I used EZhero to point the hero files to the right meshes that I want used. Do I need to move the hero files elsewhere for them to work in EZscript? I also have the EZscripteditor folder in my documents along with the .txt file I'm working on. Perhaps I need to move them to the Irrational Games folder somwhere to recognize the hero files? The Hero files also use the FFX attributes. Does EZscript take that into account or do I have to tell it?

Captain Marvel, She-hulk, Beast and Hawkeye will be playable characters so I didn't include them in the script. Is that why they are red?

M25

In the editor, go to the panels menu and select the configuration option.  In there you can tell the editor the location of your hero files directory, and it won't flag those names as a problem any more.

JLAfan2001

#10
I checked and EZscript is pointing to the right location of the hero files but they still come up red. In fact, the heroes show up in the pulldown window to the right of the editor. They are all spelled the same way as their hero files. Do I need to set them up as characters or templates in FFedit perhaps?

M25

It's likely a bug in the editor.  If the heroes are showing up in the sidebar and the names are the same, then ignore it.

EZ script works with hero files, so you don't need to add them to the game's data files.

However, if you are building a mod to distribute to other people, then you will need to make your hero files into built-in characters.  Alex's EZ hero editor can do that for you, or I have a tool on the ezscript.wikispaces.com that can make hero files into built-ins as well.



JLAfan2001

#12
Couple of more things I want to add to the starting cutscene but I'm not sure if the overview covers it. I would like kang to appear at the begining of the game as if he teleported in with some teleport FX. What would the command be for this? I know that there is a teleport to character command but he's not really doing that. Also, I would like starfox to be close to him when he does teleport in and the avengers on the otherside of the mansion when the camera pans to them. How does EZscript address the placement of characters? I also wanted kang to blast starfox. I have added "kang plays animation ranged_2" to the script and I am wondering if at the end should be something like "to starfox" to show that kang is not just randomly shooting.
Lastly, I want the avengers to run off screen. I added the run and fly animation commands. Would that be right to do?

M25

To place characters, you either put them on the map directly with the level editor, or you place markers where you want them to appear.  If you have an encounter marker called encounter1, you can tell EZ script where to place the villains and allies by adding more markers.  The first villain on the Villains: line will be placed at encounter1_villain1, the next at encounter1_villain2, etc.   It works the same with allies.  encounter1_ally1, encounter1_ally2, etc.

To tell the game where the heroes start, you add markers called hero_1, hero_2, hero_3 and hero_4 for campaign games, or skirmishstart for rumble room mods.

To do the teleport, have kang appear at a marker 'off camera', then teleport him to another marker on camera and play an effect.

Camera on kang_marker
kang teleports to kang_marker
play effect my_teleport_effect at kang

Or you may need to play the effect and then teleport him, depending on how it looks.


You can have kang use a power directly

kang uses power my_power on starfox



To run off screen, you need to place another marker somewhere out of the way and have them all run towards it.

beast moves to final_marker
angel flies to final_marker


JLAfan2001

#14
Sorry. I still don't follow where to place the markers in the cutscene below. I also want to test this on a generic map until I can get the avengers mansion. Where would I place the script to do that? How does everthing else look, M25? Any corrections need to be made?

Story: justice league of america vs the avengers

Encounter: A visit from Kang
Type: Cutscene
Allies: starfox
Villains: kang

Start Cutscene:
Camera on kang zoom 100.0 heading 100.0
kang says, "Here we are. The home of my accursed foes......The Avengers. It is beneath me to ask for their help but ask I must or all of existence will be erased. Including my own. That meddling cretin had to get in the way of my plans forcing me to come here and seek assistance. He will not be so lucky the second time our paths cross."
starfox says, "kang!!!! I don't know what you are doing here but you speak the truth about one thing. Your existence is in trouble."
kang turns to starfox
Cinematic camera on kang to starfox
starfox says, "You made a big mistake in coming here. Looks like this is going to be another scheme the Avengers will have to put an end to."
Cinematic camera on starfox to kang
kang says, "I did not come to fight, Avenger but I would be more than willing to strike you down if I must."
kang uses power gauntlet blasters on starfox
starfox says, "AAAAAHHH!!!!!"
starfox plays animation fall
Cinematic camera on starfox to beast
beast says, "That scream. It sounded like starfox."
Cinematic camera on beast to captain marvel
captain marvel says, "It came from the direction of the garden. We must investigate at once."
beast plays animation run_3
captain marvel plays animation fly
she-hulk plays animation run
hawkeye plays animation run

M25

The script looks like it will play ok.  The EZ script editor is pretty good at pointing out problems, so if it passed that, it should be fine.

You should make the name of the story shorter though, to avoid a bug in the game.


As for the markers, you have to have a specific map if you want things to happen in specific locations.  You open up the map in the level editor and place the markers on the map where you want things to happen (kang_marker, final_marker, encounter1_villain1, etc.).  Then you tell EZ script to use those markers that you placed.

Encounter: Visit from Kang
Type: Cutscene
Allies: starfox
Villains: kang
Marker: encounter1

Start Cutscene:
Camera on kang_marker
kang teleports to kang_marker
Play effect ffx_teleport on kang
kang says, "blah"
starfox turns to kang
starfox says, "right back atcha."
kang uses power kang_power on starfox
<more stuff here>
beast moves to final_marker
captain marvel flies to final_marker
she-hulk moves to final_marker
hawkeye moves to final_marker


Torch

It is interesting you say that M25, because I just got done trying something with movement and it didn't seem to work.  Of course I will playtest it more later (right now I don't have time) but it went like this:

I created a positional marker called 'villain1m' on the map.

I used the code:

'villain1 moves to villain1m'


and it didn't work.  When I tried

'villain1 moves to hero1'


it worked just fine.  It may have been something else in the script of course.  More info for you guys later.

M25

There's a bug in the parser that turns the line

villain1 moves to villain1m

into something like:

nuclear_winter moves to nuclear_winterm


To get it to work, don't use villain, minion or ally in the name of the marker.


Torch

Quote from: M25 on March 29, 2009, 04:07:19 AM
There's a bug in the parser that turns the line

villain1 moves to villain1m

into something like:

nuclear_winter moves to nuclear_winterm


To get it to work, don't use villain, minion or ally in the name of the marker.


Thanks M.  I realized this last night also.  I thought that might be the case, so I changed it to:

Villain1 moves to villmark1

Works like a charm now.

BentonGrey

Sorry I haven't been able to be of more help to you JLAfan, but it looks like you're off to a great start.  I'm looking forward to playing this!
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/

JLAfan2001

Thanks, Benton. It's going to be awhile until this is playable. I keep running into snags. I'm just not as savvy at this as some of you guys are. I'm currently running into a problem with the map. With Tommyboy's help, I managed to get the avengers mansion. What I wanted was the mansion with the grounds surrounding it instead of the mansion in the middle of the city. I edited the mansion in mesheditor and removed the gate and the surrounding wall. I wanted to use the x-mansion map. I was going to remove the x-mansion and replace it with the avengers mansion so it could simulate the grounds but I can't get the x-mansion map to load right. I'm using the one that came with the FFX3_Mappack2. Anyone else have this problem or can suggest a map that looks like a garden?

Torch

There is a multiplayer map in the stock game  :ffvstr: that may work.  It is called mp_manor.  You can remove the 'manor' and put in your Avengers Mansion.  There was also a level in the main game that was more elaborare (if you want a longer 'garden' part leading up to the house), but I can't recall the name right now.  If you are interested let me know and I will search for it.

JLAfan2001

OK. I have got a working map. I have placed the characters in the map and I have written a rough script for the first cut-scene. I have also sent the dat files to FFedit. How do I test run the cut-scene and set it up for campaign use?

Torch

#23
Did you already copy and paste your 'ffx3' folder and then name the copied one something like 'JLAvengers'?  That way we only work in that mod folder and don't mess up anything in the base 'ffx3' folder.

Once you've done that, you'll see folders named 'skirmish' and 'stories' under the 'JLAvengers' directory.  In order to playtest your mission you should do it in the Rumble Room first (before trying to integrate it into a campaign).  In order to make it Rumble-Room-Ready you need to edit two files.

One is in the 'skirmish' folder and one is in the 'stories' folder.

First, the 'stories' folder.  Name your mission something in a notepad format (.txt)  and make sure it is in this folder.  For example:  jlavengers.txt

Next, go into the 'skirmish' folder.  Copy and past the spygames.py file and rename it to jlavengers.py.  We next need to edit it to call the jlavengers.txt file.  It will look like this when we've done it:

Spoiler
#####################################################################################
#
# Module: Mini Mod JLAvengers
# Author: m25
#
# Description:
#
#
# Version 3.05
#
#####################################################################################



#Change this to the name of the story file you want to use
minimod_storyfile = 'jlavengers'


#---------------------------------------------------------

import m25minimod
from m25minimod import *

def OnSelectionRequiredCheck():   
   #change this to 1 to allow the player to select enemies, 0 (zero) to disallow
   return 0

def OnNumEnemiesCheck():
   #change this number to the number of enemies the player is allowed to select
   return 24

def OnGameTypeCheck():
   #set this list to the markers required for your mini-mod
   #leave it as is for most mods
   return ('encounter1','skirmishspawn')

The 'glow' in the above file is for emphasis so you can see what you should edit.  Only the second glow truly matters; the first one is by the # symbol which is a remark statement that is there to help you identify the file and doesn't effect the code.

Make sure to 'add a postional marker' to your map and name it 'skirmishspawn' and then add another positional marker and name it 'encounter1'.   The mini-mod will not run with EZScript in the Rumble Room otherwise.

P.S.  I don't know if you've been using this, but it has helped me a bunch:  http://ffx.freedomforceforever.com/manual/ezscript/overview.htm

JLAfan2001

#24
EZscript editor is showing the kang_marker and final_marker as red. I have placed all the characters on the map. I created a positional marker and named it kang_marker and placed it where I want on the map. I did the same for final_marker and saved. Why is it showing red? I also tried testing the script below and nothing happens. Kang, starfox and the avengers mansion don't even appear on the map.

Story: justice league of america vs the avengers

Encounter: A visit from Kang
Type: Cutscene
Allies: starfox
Villains: kang
Marker: encounter1

Start Cutscene:
Camera on kang_marker
kang teleports to kang_marker
Play effect microwave_teleportself on kang
Camera on kang zoom 100.0 heading 100.0
kang says, "Here we are. The home of my accursed foes......The Avengers. It is beneath me to ask for their help but ask I must or all of existence will be erased. Including my own. That meddling cretin had to get in the way of my plans forcing me to come here and seek assistance. He will not be so lucky the second time our paths cross."
starfox says, "kang!!!! I don't know what you are doing here but you speak the truth about one thing. Your existence is in trouble."
kang turns to starfox
Cinematic camera on kang to starfox
starfox says, "You made a big mistake in coming here. Looks like this is going to be another scheme the Avengers will have to put an end to."
Cinematic camera on starfox to kang
kang says, "I did not come to fight, Avenger but I would be more than willing to strike you down if I must."
kang plays animation ranged_2
starfox says, "AAAAAHHH!!!!!"
starfox plays animation fall
Cinematic camera on starfox to beast
beast says, "That scream. It sounded like starfox."
Cinematic camera on beast to captain marvel
captain marvel says, "It came from the direction of the garden. We must investigate at once."
beast moves to final_marker
captain marvel flies to final_marker
she-hulk moves to final_marker
hawkeye moves to final_marker
she-hulk says, "You have some nerve coming here, Kang. You must be looking a beating"
hawkeye says, "Oh come on, Shulkie. He's probably lost. Even time-travellers take on a wrong turn sometimes. See what happens when you don't stop for directions, Kang."
kang says, "Impudent fool! You shall pay for your arrogance."
Next: Save Starfox

Encounter: Save Starfox
Type: Save Civilian
Villains: kang
Allies: starfox
Next: If Ally Survives: Kang Fight
Next: If Ally Lost: End

Alert Cutscene:
Yellow arrow on Ally

End Cutscene: beast says "Are you all right, Starfox."
starfox says, "I'm fine. My pride is hurt more than anything else."



















M25

You need to go to the configuration panel again and set the map entry to the map file you are using. 

Double-check your map first, though, to make sure everything actually saved the way you wanted it.  If the building isn't appearing, then something didn't work.


JLAfan2001

#26
I've pointed the configuration panel to the location of the map and gave it a test run. The game completely bypasses the opening cut-scene and goes straight to the action. Not what I was hoping for. Kang appears on the kang_marker at the start of the game. I wanted him to teleport there in the cut-scene and this seems to be causing two kangs appear. I've back tracked and to the best of my knowledge, I did everything I was told to. What am I doing wrong?

M25

Play effect microwave_teleportself on kang

should  be

Play effect microwave_teleportself at kang

The biggest reason a cutscene doesn't play is that there are characters or markers required by the cutscene that don't exist on the map.

So you need to make sure that kang_marker, kang, starfox, beast, captain marvel, final_marker, she-hulk and hawkeye are all there (and spelled correctly).


JLAfan2001

I've added everything but the kitchen sink. I have added

encounter1_hero1 and have beast on it
encounter1_hero2 and have captain marvel on it
encounter1_hero3 and have hawkeye on it
encounter1_hero4 and have she-hulk on it
encounter1_villain1 and have kang on it
encounter1_ally1 and have starfox on it
encounter1
final_marker
skirmishspawn

I prolly don't need that many markers but I wanted to make sure all the bases were covered. I have a working map that I'm tesing it on. I configured EZscript to point to the map and hero file locations. EZscript doesn't point out any problems other than the characters are red but we have determined that's prolly a bug. I have the jlavengers.txt file under the stories folder in FFX. I edited the spygames.py file in FFX skirmish and named it MiniMod jlavengers.py.

Story: jlavengers

Encounter: A visit from Kang
Type: Cutscene
Allies: starfox
Villains: kang
Marker: encounter1

Start Cutscene:
Camera on kang_marker
Play effect microwave_teleportself at kang
kang teleports to kang_marker
Camera on kang zoom 100.0 heading 100.0
kang says, "Here we are. The home of my accursed foes......The Avengers. It is beneath me to ask for their help but ask I must or all of existence will be erased. Including my own. That meddling cretin had to get in the way of my plans forcing me to come here and seek assistance. He will not be so lucky the second time our paths cross."
starfox says, "kang!!!! I don't know what you are doing here but you speak the truth about one thing. Your existence is in trouble."
kang turns to starfox
Cinematic camera on kang to starfox
starfox says, "You made a big mistake in coming here. Looks like this is going to be another scheme the Avengers will have to put an end to."
Cinematic camera on starfox to kang
kang says, "I did not come to fight, Avenger but I would be more than willing to strike you down if I must."
kang plays animation ranged_2
starfox says, "AAAAAHHH!!!!!"
starfox plays animation fall
Cinematic camera on starfox to beast
beast says, "That scream. It sounded like starfox."
Cinematic camera on beast to captain marvel
captain marvel says, "It came from the direction of the garden. We must investigate at once."
beast moves to final_marker
captain marvel flies to final_marker
she-hulk moves to final_marker
hawkeye moves to final_marker
she-hulk says, "You have some nerve coming here, Kang. You must be looking a beating"
hawkeye says, "Oh come on, Shulkie. He's probably lost. Even time-travellers take on a wrong turn sometimes. See what happens when you don't stop for directions, Kang."
kang says, "Impudent fool! You shall pay for your arrogance."
Next: Save Starfox

Encounter: Save Starfox
Type: Save Civilian
Villains: kang
Allies: starfox
Next: If Ally Survives: Kang Fight
Next: If Ally Lost: End

Alert Cutscene:
Yellow arrow on Ally

End Cutscene: beast says "Are you all right, Starfox."
starfox says, "I'm fine. My pride is more hurt than anything else."

M25

#29
What about kang_marker?


Kang is appearing twice because you are placing him on the map yourself and telling EZ script to spawn him by putting him in the Villains: line.

You should remove the Next: line at the end of the cutscene as well, since you don't need it and it may be causing problems with the cutscene.