Hi,
My first mission does not appear to be running within ffedit when testing. All it sees is a black screen but when placing the characters in level editor it appeared fine. I am using EZscript. Anyone seen this issue before and know what the likely cause could be?
Thanks.
Hi, if I remember correctly (it's been many, many years?), this could be caused by clicking the Campaign tab (yes, this bonker UX is the symptom of an internal tool, not something designed first and foremost for modders), which immediately generates an empty campdef.dat (?) file.
You could first try moving the campdef.dat file from your mod's folder to another one (say, your desktop) to see if it solves the issue. Otherwise, you'd probably need to restore the original camdef.dat from the unmodded game (i.e., either from data\campdef.dat or from the dat.ff file, which is actually a Zip archive).
Caveat emptor: I haven't done this in more than ten years, and can't currently run FFEdit; every single thing I wrote could be wrong. Hopefully someone does remember the exact procedure, otherwise... please back up first.
I tried that but no joy im afraid. Any other suggestions?
Thanks
Sorry, I don't have any other solution. However, you could post your script.log and ff.log as it may help identify the cause.
Howdy Mal19uk, as Epimethee said, it might help to post your logs, but first of all, make sure you post your actual EZScript mission so we can see it. There are a lot of things that can cause that, and it'll be easiest to troubleshoot if we can see the script.
One thing that I often forget is to include an unfade command in your opening encounter. Without that, you'll see just a black screen.
Hi BG,
I can't seem to post my logs on here as I keep getting told to enable java script as it flags it as spam. Is there any way around this? On my script log I noticed a couple of keyerror 'missions'. Would that mean something is wrong with the missions folder?
By the way I saw your fantastic tutorial videos yesterday. Very useful info!
Mal19uk, I'm glad you found them helpful!
So, first things first, copy and paste your script here so we can take a look at it.
Then, probably in a new post, try copying and pasting your script.log. Look for "Traceback," which will mark an error.
:EDIT: I just noticed that you're running your testing your mission through FFEdit. Since it's the first mission, do you have your heroes added directly to the map already?
Here is part of my script.log
Traceback (innermost last):
File "C:\Users\mal19\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\mission.py", line 26, in OnPostInit
m25minimod.OnPostInit(campaign=1)
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\m25minimod.py", line 129, in OnPostInit
ffx.FFX_InitMission() # start FFX
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 258, in FFX_InitMission
initialise(0)
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 403, in initialise
FFX_Transformers = getBuiltinTransformers()
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 744, in getBuiltinTransformers
for char in getAllCharacters(checkLiving = 1, lures = 0, specialCharacters = 0):
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 20512, in getAllCharacters
specialChar = isSpecialChar(object)
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 20457, in isSpecialChar
return FFX_GetTemplate(obj) in ('ffx_tiggot', 'ffx_tiggot1', '------------', '---Buddies---',) #please update as needed
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 937, in FFX_GetTemplate
return chardata.GetCharacterData(char).get('charName')
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\chardata.py", line 301, in GetCharacterData
_SavedData = Campaign_ReadCharactersFromSavedGame()
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\datfiles.py", line 1483, in Campaign_ReadCharactersFromSavedGame
FileName = GetMostRecentSavedGameFile()
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\datfiles.py", line 2807, in GetMostRecentSavedGameFile
missions = map(string.upper,Campaign_ReadCampaignDefinitions(os.path.join(ModPath,'campdef.dat'))['missions'])
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\datfiles.py", line 1437, in Campaign_ReadCampaignDefinitions
_CampdefData[FileName]['totalMissions'] = ord(dat[4389])
IndexError: string index out of range
! GetMapInfo
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))
Character_HasAttribute: error checking 'cyclops1' (cyclops) for tempform
Character_HasAttribute: error checking 'cyclops1' (cyclops) for involuntaryform
Character_HasAttribute: error checking 'cyclops1' (cyclops) for ffqamalgam
Traceback (innermost last):
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 658, in initAttribs
object=initialiseChar(object)
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 788, in initialiseChar
t=FFX_GetTemplate(char)
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 937, in FFX_GetTemplate
return chardata.GetCharacterData(char).get('charName')
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\chardata.py", line 301, in GetCharacterData
_SavedData = Campaign_ReadCharactersFromSavedGame()
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\datfiles.py", line 1483, in Campaign_ReadCharactersFromSavedGame
FileName = GetMostRecentSavedGameFile()
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\datfiles.py", line 2807, in GetMostRecentSavedGameFile
missions = map(string.upper,Campaign_ReadCampaignDefinitions(os.path.join(ModPath,'campdef.dat'))['missions'])
KeyError: missions
Plugin 'firehydrant' OnPostInit() called
Traceback (innermost last):
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 21734, in OnPseudoOnPostInitGo
exec OnPostInit
File "<string>", line 1, in ?
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffxplugins\active\ffq_zombie\zombie.py", line 65, in OnPostInit
for char in ffx.getAllCharacters(): #register existing characters
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 20512, in getAllCharacters
specialChar = isSpecialChar(object)
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 20457, in isSpecialChar
return FFX_GetTemplate(obj) in ('ffx_tiggot', 'ffx_tiggot1', '------------', '---Buddies---',) #please update as needed
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\ffx.py", line 937, in FFX_GetTemplate
return chardata.GetCharacterData(char).get('charName')
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\chardata.py", line 301, in GetCharacterData
_SavedData = Campaign_ReadCharactersFromSavedGame()
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\datfiles.py", line 1483, in Campaign_ReadCharactersFromSavedGame
FileName = GetMostRecentSavedGameFile()
File "C:\GOG Games\Freedom Force vs the 3rd Reich\malmod\missions\scripts\datfiles.py", line 2807, in GetMostRecentSavedGameFile
missions = map(string.upper,Campaign_ReadCampaignDefinitions(os.path.join(ModPath,'campdef.dat'))['missions'])
KeyError: missions
This is my mission ezscript:
Story: mission001
Encounter: begin1
Type: Cutscene
Next: Bring in cyclops
Start Cutscene:
Camera on cyclops
Unfade for 3 seconds
cyclops says, "lets go!"
Encounter: Bring in cyclops
Type: Campaign Recruit
Allies: cyclops
Villains: diamond_jack
Prestige: 1000
Next: beat diamond_jack
Encounter: beat diamond_jack
Type: Fight
Villains: diamond_jack
Primary Objective: "Defeat diamond jack" for 2000 prestige
Encounter: Final1
Type: Cutscene
Next: Win
#-------------------------------------------------------------------------------
Encounter: Final2
Type: Cutscene
Next: Lose
Start Cutscene:
Play Transition
Here is my mission.py
minimod_storyfile = 'mission'
import m25minimod
from m25minimod import *
def OnPostInit():
m25minimod.OnPostInit(campaign=1)
Hi,
I think I might know why its not working. I haven't added any encounter markers! OK really stupid question now, I dont see an option to add encounter markers on edit-in-game only positional markers. What am I missing?
Hi,
Sorry me again. I have now added the encounter markers but still same issue. Hopefully the script.log I posted previously will shine a light if anyone can help?
Haha, yeah, that will do it! I've made that mistake plenty of times. Anyway, did I not cover this in my tutorials? If not, that's an oversight! So, the positional markers ARE the encounter markers. They just need to have their names changed. So, go and add positional markers wherever you want your encounters to be, then go and rename them from the FFEdit interface. What I tend to do is create all of the basic markers and rename them (battle1, street1, square1, etc), then I copy them and rename them to the sub-markers that I'm going to use to specify exactly where stuff in an encounter goes (battle1_villain1, street1_end, etc.). Then I open up the 3D editor again, and copy the single instances that will have multiple other instances and position them wherever I want. Thus, I create positional1, close the 3D map, rename it battle1 in FFEdit, make several copies, rename them to battle1_villain1, battle1_ally1, and battle1_object1. Then I open the 3D editor again and make copies of those, positioning them where I want the characters and objects to appear, until I have as many as I want. Make sure you create all the encounter markers necessary for EZScript to function. You'll find a guide for that here:
https://bentongrey.wordpress.com/2010/01/18/the-ease-of-ezscript/
:EDIT: Make sure the map is EZScript compatible, meaning that it has the basic EZScript and map markers. Check my tutorial above for a list.
Okay, from your log, it looks like your mission is throwing up a lot of errors. Are you using FFX as a base? I'm not sure I understand all of this, but it looks like there are probably a few different things going on. One thing that stick out is this:
QuoteCharacter_HasAttribute: error checking 'cyclops1' (cyclops) for tempform
Character_HasAttribute: error checking 'cyclops1' (cyclops) for involuntaryform
Character_HasAttribute: error checking 'cyclops1' (cyclops) for ffqamalgam
It looks like some of the attributes your Cyclops has may be causing some problems. For example, 'tempform' can't be used on a character that you bring in on missions, and Amalgam may be the same. Instead, those are used to bring characters in to replace mission characters, like shape changing.
The first line of the script.log MIGHT have to do with your launching the mission from the editor instead of from the game? I'm not really sure. I have generally not tried to test from the editor. I just test in game, so I'm not 100% positive that it will work for EZScript.
Hi,
Thats odd about cyclops as he definitely does not have shape changing attribute. I am not trying to run from the editor now just from the main game but still getting the same issue.
Hi Benton,
I saw on another similar post from Alex a while back that you advised him to have more than one mission showing in the campaign. I tried that and now the mission loads however the first cutscene cyclops does not speak and nothing happens unless I press esc to skip. I can then control cyclops but cannot go to the rest of the map outside the immediate area. There is a white rectangle bordering half the screen where the cutscene would have shown so it looks like the cutscene is not starting or ending properly. Any thoughts from my EZscript layout?
Thanks again and sorry for bombarding with all these questions.
Ok new update. I took out the line of speech and it works really well now. Only other weird thing is that it now spawns 2 villains instead of 1. I probably need to go over adding speech in the tutorial and add the line in captions.txt but wasnt sure if this was still needed with EZscript?
Hey man, no worries! No need to apologize. I love helping new modders get started!
D'oh! I forgot about the multiple mission thing. I should have said that, but I didn't think of it because you were testing through the editor.
So, what's happening there is that your first cutscene is starting (which is how you're unfading) but getting hung-up and stuck.
One thing I notice, you use your character's name in your encounter titles. I have a hard rule: I never use ANYTHING that resembles or contains any terms used or possibly to be used in my missions for my titles. That can often cause things to choke, because FF will get confused about which is which. Don't use encounter types, don't use character names, and don't use marker names. Keep everything completely separate to avoid errors.
My other guess is that the character template might be misspelled or might have other issues? I'd double check that. Did you create your mission with EZScript Edit?
:EDIT: Haha, you're too quick for me, Mal. I started this response and got sidetracked. So, the captions.txt will have no impact on whether the mission plays properly. All that does is give you the talking heads. So that means that there is something about your dialog line that breaks the mission. Check the file in a .txt editor like notepad to make sure you don't have extra spaces or have two things on the same line or anything, as that can occasionally happen.
You've got two villains spawning because that encounter is starting twice. That probably has something to do with the previous one's issues, though I'm not quite sure what. OR it could be a matter of complex numbers. Have you branded your characters with FFXEdit?
Hi,
OK, all the issues so far are fixed except for getting captions to work. I have followed all the steps on the ezscript guide and tried both alternatives suggested there but after using the rumble room generate captions my captions do not show up in captions.txt. I cant see any errors on script.log so really at a loss.
Thanks.
Update: The speech lines are still not showing up in captions.txt but when playing the game the captions show in small white letters on the top left corner of the screen instead of being shown with a talking head. Any ideas?
Great! Glad you got those issues fixed!
So, what you're seeing is how the dialog shows up until you've got your captions generated. If you're trying to generate captions and you aren't seeing them show up in your captions.txt, something's going wrong. Do you have your mission.txt copied into your Stories folder? If not, there won't be anything to be copied into the captions.txt. If that isn't the issue, then walk me through what you're doing, and I'll try to help you find what's going wrong.
That was the issue! Yessss! All working now. Hopefully now that should make creating future missions so much easier.
Thank you so much.
Awesome! And you're very welcome. I'm quite glad to help. Once you learn the basic patterns, it definitely gets easier. Let me know if you run into any trouble
Urrrggghh...
Sorry, back again. So on my 2nd mission it loads up the base screen but when I press "start briefing" nothing happens. Any ideas?
Thanks in advance.
Update: Realised I didnt put any encounter markers on the base scene.
Base works fine now but the 2nd mission does not load any of the encounters including opening cutscene or setting objectives or FFX attributes dont work either. This is despite having plenty of encounter markers and a skirmishspawn marker. I can control the heroes in the mission though.
Thanks again in advance.
Hmm. So, post your mission.txt, and let's take a look. That sounds like the encounters aren't initiating. This could mean that your first encounter is broken, that you don't have the right Python files in your 2nd mission folder, or something more esoteric. So, double-check your Python files, then start looking at your opening encounter.
Here is my mission.txt for ezscript:
Story: mission002
Encounter: begin1
Type: Cutscene
Next: Bring in member
Start Cutscene:
Camera on cyclops
Unfade for 3 seconds
cyclops says, "We need to take out arthur metzger"
Encounter: Bring in member
Type: Campaign Recruit
Allies: marvel_girl
Prestige: 1000
Next: beat baddie
Encounter: beat baddie
Type: Fight
Villains: arthur_metzger
Primary Objective: "Defeat arthur metzger" for 2000 prestige
Encounter: Final1
Type: Cutscene
Next: Win
#-------------------------------------------------------------------------------
Encounter: Final2
Type: Cutscene
Next: Lose
Start Cutscene:
Play Transition
Never mind, figured it out. My mission.py was empty despite copying and pasting the file from my first mission. All good now!
Great! Weird that it was blank.
Ok, next obstacle.
New mission does not run though the cutscene on mission or base and the villain and ally are not appearing on the mission.
This is the first time I am using custom AI so maybe something I have done wrong there?
Quote from: mal19uk on March 05, 2022, 01:32:19 PMThis is the first time I am using custom AI so maybe something I have done wrong there?
I'm not sure what the problem is that you have, but I can say that the custom ai have nothing to do with the appearance or disappearance of the characters. When there is an error in the AI, the character does not move, does nothing or acts strange.
Mal, i'm not sure I understand what you're saying. Are you saying that the base scene isn't working or that the mission isn't working? Both?
As OK says, AI problems can keep characters from acting, but if they aren't spawning at all, that means one of three things: 1) script problems, 2) Complex problems, 3) marker problems.
Please give us a bit more detail about what's happening and post the relevant scripts. We'll try to help you troubleshoot.
There are clear errors on the script.py but having trouble pasting it into the post at the moment. Will sort that out then hopefully will have a clearer picture of what is going on.
Script.log can be helpful, but first and foremost, make sure you post your actual mission.txt and base.txt.
Update: Cutscenes are now working. I regenerated the language dats and it worked. Villains and allies still not appearing though.
Here is mission.txt:
Story: mission003
Encounter: begin1
Type: Cutscene
Next: friends
Start Cutscene:
Camera on cyclops
Unfade for 3 seconds
cyclops says, "We need to take out magneto"
Encounter: friends
Type: Custom
Actions: allies follow heroes, villains fight heroes, allies remain after encounter ends
Villains: mv_magneto
Allies: angel
Marker: warehouse1
Next: beat baddies
Encounter: beat baddies
Type: Fight
Villains: mv_magneto
Primary Objective: "Defeat magneto" for 2000 prestige
Encounter: Final1
Type: Cutscene
Next: Win
#-------------------------------------------------------------------------------
Encounter: Final2
Type: Cutscene
Next: Lose
Start Cutscene:
Play Transition
New update: All fixed! My villain character was buggy as I sent to dat the same character twice without realising from ezhero which caused a bug. I recreated the character from scratch and all is working.
Great troubleshooting, Mal! That's 90% of modding!