Problems with scripts [Solved]
Moderator: Moderators
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Problems with scripts [Solved]
Sooooo I've had issues with getting custom sides to work (which I still haven't been able to get working) and also doing some other things to customize my custom worlds via the scripts. I think the problem I am having is something along the lines of the changes I am applying are not doing anything or even being regonized. I always save my work and munge everything properly (I think) but nothing works. Any solutions or suggestions?
Last edited by F1ghter16 on Mon Jul 31, 2017 9:56 pm, edited 1 time in total.
-
- Sergeant Major
- Posts: 234
- Joined: Sat Feb 04, 2017 5:52 pm
- xbox live or psn: No gamertag set
- Location: Milky Way, Solar System, Earth, Antarctica
Re: Problems with scripts
First question I want to ask you how fast is the munge?
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
When doing the munge for world creation, it takes the standard time (don't know exactly what that is off-hand). When munging with Common selected, it takes about two and a half minutes on average. Munging everything takes about three to four minutes
-
- Sergeant Major
- Posts: 234
- Joined: Sat Feb 04, 2017 5:52 pm
- xbox live or psn: No gamertag set
- Location: Milky Way, Solar System, Earth, Antarctica
Re: Problems with scripts
Ok, that means you have the fix. Double check your units, .req, .odf, .lua again.
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
Everything looks like it should. Something that I forgot to mention earlier was that fact that I can't even change skins and such, which is kinda annoying. I'm starting to wonder if it's just my computer system that doesn't like modding.
-
- Sergeant Major
- Posts: 234
- Joined: Sat Feb 04, 2017 5:52 pm
- xbox live or psn: No gamertag set
- Location: Milky Way, Solar System, Earth, Antarctica
Re: Problems with scripts
Did you apply the dc to the lua?F1ghter16 wrote:Everything looks like it should. Something that I forgot to mention earlier was that fact that I can't even change skins and such, which is kinda annoying. I'm starting to wonder if it's just my computer system that doesn't like modding.
For example: ReadDataFile("dc:SIDE\\rep.lvl",
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
Yes I have. Do it every single time so I don't know what else to do. I've tried using many, many tutorials but nothing is working.
-
- Sergeant Major
- Posts: 234
- Joined: Sat Feb 04, 2017 5:52 pm
- xbox live or psn: No gamertag set
- Location: Milky Way, Solar System, Earth, Antarctica
Re: Problems with scripts
Can you post your .lua script please.
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
I'm kinda new at posting files like a .lua on GameToast, so could you maybe tell me how to do that (hopefully this won't count as a double question)? Once I know how I'll post it right away.
-
- Sergeant Major
- Posts: 234
- Joined: Sat Feb 04, 2017 5:52 pm
- xbox live or psn: No gamertag set
- Location: Milky Way, Solar System, Earth, Antarctica
Re: Problems with scripts
click the hide button and post your .lua code in it
Example (This .lua code is from my mod)
Example (This .lua code is from my mod)
Hidden/Spoiler:
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
Ok, here's what I got right now:
I decided to use an example side for this round just to make sure I had everything I needed rather than miss a few things.
EDIT
I believe I have found the problem (not solution) with the scripting. It appears that I can't add anything to the original, but if I move stuff around, such as default units already in the .lua, things change, but that's it (I was able to give the rep a droideka, but nothing outside of the pre-set list of units, such as a stormtrooper and such). I don't think it's necessarily something wrong with my scripting abilities, but something internal. So now I need a solution to this narrowed down issue.
Hidden/Spoiler:
EDIT
I believe I have found the problem (not solution) with the scripting. It appears that I can't add anything to the original, but if I move stuff around, such as default units already in the .lua, things change, but that's it (I was able to give the rep a droideka, but nothing outside of the pre-set list of units, such as a stormtrooper and such). I don't think it's necessarily something wrong with my scripting abilities, but something internal. So now I need a solution to this narrowed down issue.
-
- Jedi
- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Problems with scripts
Please post your lua, are you loading the units you're trying to add in addition to setting them up in the setup teams area??
-
- Sergeant Major
- Posts: 234
- Joined: Sat Feb 04, 2017 5:52 pm
- xbox live or psn: No gamertag set
- Location: Milky Way, Solar System, Earth, Antarctica
Re: Problems with scripts
He did post the .lua
-
- Jedi
- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Problems with scripts
ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman")
You need this as well if you're going to add the stormtrooper for example, you need to load the unit first (here)
Before actually making it a playable units (Done with setup teams)
"imp_inf_rifleman")
You need this as well if you're going to add the stormtrooper for example, you need to load the unit first (here)
Before actually making it a playable units (Done with setup teams)
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
I have tried using that recently, but it doesn't work. I think my problems have to do with either BF2 ModTools or BF2 not accepting any changes or additions to the script. I don't know if there's something I need to change or what.ARCTroopaNate wrote:ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman")
You need this as well if you're going to add the stormtrooper for example, you need to load the unit first (here)
Before actually making it a playable units (Done with setup teams)
EDIT
Hidden/Spoiler:
-
- Jedi
- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Problems with scripts
You're trying to call for units that don't exist, there is no all_inf_ep3_officer in the rep side and there is no cis_inf_droideka in the rep side.
The top section is where you load units from side folders, the unit you're calling for has to exist in that side folder.
The game can't load something that doesn't exist, if you want to use the stormtrooper, you have to call him from the imp side, like I showed in the post above.
The setup teams section is where you determine which units are selectable for each team, if you wanted to add the imperial stormtrooper to that (after calling him from the imp side folder), you could do this to add him to the rep side AddUnitClass(REP, "imp_inf_rifleman")
The top section is where you load units from side folders, the unit you're calling for has to exist in that side folder.
The game can't load something that doesn't exist, if you want to use the stormtrooper, you have to call him from the imp side, like I showed in the post above.
The setup teams section is where you determine which units are selectable for each team, if you wanted to add the imperial stormtrooper to that (after calling him from the imp side folder), you could do this to add him to the rep side AddUnitClass(REP, "imp_inf_rifleman")
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
I understand all that and have tried creating many different mods doing the things you've mentioned, but to no avail. If I try to change even the most simplest of things, such as skins, it all stays the same, no matter what.ARCTroopaNate wrote:You're trying to call for units that don't exist, there is no all_inf_ep3_officer in the rep side and there is no cis_inf_droideka in the rep side.
The top section is where you load units from side folders, the unit you're calling for has to exist in that side folder.
The game can't load something that doesn't exist, if you want to use the stormtrooper, you have to call him from the imp side, like I showed in the post above.
The setup teams section is where you determine which units are selectable for each team, if you wanted to add the imperial stormtrooper to that (after calling him from the imp side folder), you could do this to add him to the rep side AddUnitClass(REP, "imp_inf_rifleman")
-
- Sergeant Major
- Posts: 234
- Joined: Sat Feb 04, 2017 5:52 pm
- xbox live or psn: No gamertag set
- Location: Milky Way, Solar System, Earth, Antarctica
Re: Problems with scripts
My friend bill is having the same problem.
-
- Private Third Class
- Posts: 49
- Joined: Thu Jul 06, 2017 3:49 pm
- Projects :: ARC Trooper Era
- xbox live or psn: No gamertag set
Re: Problems with scripts
Well, glad to hear that it's not just me. If anyone has a solution to this, I would love to hear it. I really want to make my own mods, but right now it seems like I can't. The best I can do right now is give the rep a droideka, which isn't very impressive.LitFam wrote:My friend bill is having the same problem.
-
- Recruit Womprat Killer
- Posts: 13
- Joined: Sat Jun 24, 2017 12:27 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Problems with scripts
After reading this, some clarification is needed here. Here are just some of the things you can use to fix your issue because loads of things can be your issue under that description so I'm just gonna go through all that might help, and wrap all that everyone else mentioned, also its a good way check for future.
(This is a bit confusing on what exactly type of side modification you trying to do but..)
Okay from what I get if...
1)
You are trying to add a completely different side then you need the side req file, req file for each odf used, the odfs, in odfs the mesh, effects and animation is called in the odf file, and the .msh files are attached with their TGA textures and .option file.
2)
If you are JUST using stock sides or other modders sides and simply adjusting them then...
As mentioned above by LitFam and ARCTroopaNate you load the proper stock/custom side in your sides folder...
3)
After that IF they are units make sure they are selectable in your setupteams section...
4)
As quoted by ARCTroopaNate, you cannot simply add units that are not in the folder of such side or have names that dont actually exist as a ODF file in your Sides/odf. Result is a crash or file wont appear in game.
5)
STOCK SIDE VERY IMPORTANT: if you are copying the sides from stock assets and you are copying the side you want let's say "rep", you must also copy the "common" folder that is also in your stock sides folder like so...
In the end in your custom sides, you must have both common and the "rep" folder (or whatever folder u used) like so....
NOTE THE ADDRESS IN THOSE IMAGES, ONE IS FROM YOUR STOCK ASSETS (FIRST ONE) THE SECOND ONE IS IN YOUR MODS SIDES FOLDER
6)
And a side note, some adjustments require more memory so make sure the pool memory is enough for each entity from the following list...
By: AceMastermind
Thread link = http://www.gametoast.com/viewtopic.php?p=469068#p469068
In the code below you simply check your BFront2.log from your dev mod tools which pools might cuz crashes or simply says that it refuses to load if there is not enough memory.
Then grab the one that has low memory and either if its there bump it up, or create a new one by taking the one in the list below and putting this under the poolsize section...
Link to mod tools (QUESTION 4) = http://www.gametoast.com/viewtopic.php?f=27&t=13806
7)
Lastly, check out (If you did not) two great videos by jedimoose32 (GREAT GUY) that explains a lot on creating custom sides if that's what you are trying to do.
Here are the two videos on sides it may come of use if you have not seen these yet...
CUSTOM SIDES:
STOCK SIDES:
And the last help from my end, I am making videos explaining how to edit stock and create custom sides so if you cannot get them to work you can check out back in a bit and check out new video tutorials they might help you out I will try to go over most major concepts.(I will update this with a link if I wont forget XD)
Here is the link to the channel if you want to see it in a week or two.
https://www.youtube.com/channel/UCrsvR2 ... freload=10
Other than that I got nothing unless I can actually see all your Lua and folder hierarchy.
(This is a bit confusing on what exactly type of side modification you trying to do but..)
Okay from what I get if...
1)
You are trying to add a completely different side then you need the side req file, req file for each odf used, the odfs, in odfs the mesh, effects and animation is called in the odf file, and the .msh files are attached with their TGA textures and .option file.
2)
If you are JUST using stock sides or other modders sides and simply adjusting them then...
As mentioned above by LitFam and ARCTroopaNate you load the proper stock/custom side in your sides folder...
Then you need to assign the odf the ReadDataFile of your sides, lets say you have a sides foler "MOD" then you would load it under the ReadDataFile("dc:SIDES\\MOD.lvl", --YOU make one if it does not existLitFam wrote:Did you apply the dc to the lua?F1ghter16 wrote:Everything looks like it should. Something that I forgot to mention earlier was that fact that I can't even change skins and such, which is kinda annoying. I'm starting to wonder if it's just my computer system that doesn't like modding.
For example: ReadDataFile("dc:SIDE\\rep.lvl",
Here is another example of the above...ARCTroopaNate wrote:ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman")
You need this as well if you're going to add the stormtrooper, for example, you need to load the unit first (here)
Before actually making it a playable unit (Done with setup teams)
Hidden/Spoiler:
After that IF they are units make sure they are selectable in your setupteams section...
Hidden/Spoiler:
As quoted by ARCTroopaNate, you cannot simply add units that are not in the folder of such side or have names that dont actually exist as a ODF file in your Sides/odf. Result is a crash or file wont appear in game.
Personally, I think the step bellow is the issue you are havingARCTroopaNate wrote:You're trying to call for units that don't exist, there is no all_inf_ep3_officer in the rep side and there is no cis_inf_droideka in the rep side.
The top section is where you load units from side folders, the unit you're calling for has to exist in that side folder.
The game can't load something that doesn't exist, if you want to use the stormtrooper, you have to call him from the imp side, like I showed in the post above.
The setup teams section is where you determine which units are selectable for each team, if you wanted to add the imperial stormtrooper to that (after calling him from the imp side folder), you could do this to add him to the rep side AddUnitClass(REP, "imp_inf_rifleman")
5)
STOCK SIDE VERY IMPORTANT: if you are copying the sides from stock assets and you are copying the side you want let's say "rep", you must also copy the "common" folder that is also in your stock sides folder like so...
In the end in your custom sides, you must have both common and the "rep" folder (or whatever folder u used) like so....
NOTE THE ADDRESS IN THOSE IMAGES, ONE IS FROM YOUR STOCK ASSETS (FIRST ONE) THE SECOND ONE IS IN YOUR MODS SIDES FOLDER
6)
And a side note, some adjustments require more memory so make sure the pool memory is enough for each entity from the following list...
By: AceMastermind
Thread link = http://www.gametoast.com/viewtopic.php?p=469068#p469068
In the code below you simply check your BFront2.log from your dev mod tools which pools might cuz crashes or simply says that it refuses to load if there is not enough memory.
Then grab the one that has low memory and either if its there bump it up, or create a new one by taking the one in the list below and putting this under the poolsize section...
Code: Select all
SetMemoryPoolSize("From Below List", 600)
Hidden/Spoiler:
7)
Lastly, check out (If you did not) two great videos by jedimoose32 (GREAT GUY) that explains a lot on creating custom sides if that's what you are trying to do.
Here are the two videos on sides it may come of use if you have not seen these yet...
CUSTOM SIDES:
STOCK SIDES:
And the last help from my end, I am making videos explaining how to edit stock and create custom sides so if you cannot get them to work you can check out back in a bit and check out new video tutorials they might help you out I will try to go over most major concepts.(I will update this with a link if I wont forget XD)
Here is the link to the channel if you want to see it in a week or two.
https://www.youtube.com/channel/UCrsvR2 ... freload=10
Other than that I got nothing unless I can actually see all your Lua and folder hierarchy.