lua variable for mission era?
Moderator: Moderators
- commanderawesome
- Field Commander

- Posts: 971
- Joined: Tue Aug 13, 2013 11:58 pm
- Projects :: Skin Changer - Warfront - Other stuff
- xbox live or psn: AaTc_CmdrAwesome
- Location: The Universe
lua variable for mission era?
Quick question: is there any lua variable for what era the mission is?
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: All-Purpose Request Thread (Mk. IV)
No, the only things you can use are:
__thisMapsMode__
__thisMapsCode__
from the v1.3 patch. I had the same problem, so i added a new Boolean variable for my own republic commando era. I set it in the lua script and used it in an custom user script, to do some changes only to my own era.
__thisIsRcEra__
__thisMapsMode__
__thisMapsCode__
from the v1.3 patch. I had the same problem, so i added a new Boolean variable for my own republic commando era. I set it in the lua script and used it in an custom user script, to do some changes only to my own era.
__thisIsRcEra__
- commanderawesome
- Field Commander

- Posts: 971
- Joined: Tue Aug 13, 2013 11:58 pm
- Projects :: Skin Changer - Warfront - Other stuff
- xbox live or psn: AaTc_CmdrAwesome
- Location: The Universe
Re: All-Purpose Request Thread (Mk. IV)
How would I do that? I want to make some commands do different things on mod eras than they do on the stock eras.Anakin wrote: I had the same problem, so i added a new Boolean variable for my own republic commando era. I set it in the lua script and used it in an custom user script, to do some changes only to my own era.
__thisIsRcEra__
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: All-Purpose Request Thread (Mk. IV)
That will be difficult. try to find how these (__thisMapsMode__, __thisMapsCode__) are defined and get the era from there.
I added __thisIsRcEra__ = true to all rc lua scripts and in my custom_user_script i use if(__thisIsRcEra__) then,... to make the changes only to my mod.
But it will be harder to get it working for stock era. I couldn't find a way to get the era code, so made this work around. Start a modding thread. I'm interested in a solution, too.
I added __thisIsRcEra__ = true to all rc lua scripts and in my custom_user_script i use if(__thisIsRcEra__) then,... to make the changes only to my mod.
But it will be harder to get it working for stock era. I couldn't find a way to get the era code, so made this work around. Start a modding thread. I'm interested in a solution, too.
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: All-Purpose Request Thread (Mk. IV)
The 1.3 source files for utility_functions2.lua and fakeconsole_functions.lua are available and I recently noticed - you can call those scripts in your mission.req as a "script" entry, and your game will load them and ignore the 1.3 scripts from the actual game's 1.3 patch files.Anakin wrote:That will be difficult. try to find how these (__thisMapsMode__, __thisMapsCode__) are defined and get the era from there.
I added __thisIsRcEra__ = true to all rc lua scripts and in my custom_user_script i use if(__thisIsRcEra__) then,... to make the changes only to my mod.
But it will be harder to get it working for stock era. I couldn't find a way to get the era code, so made this work around. Start a modding thread. I'm interested in a solution, too.
This means you can insert more era thingies for your own specific mod by adding them to those two scripts. You can also edit fakeconsole_fucntions.lua so that you can remove specific fake console items to prevent the player from doing something in your own mod.
Kinda unrelated - you can call many scripts in your mission.req that would normally load from ingame.lvl or common.lvl and the mission.lvl will use them instead of default ones.
I've been able to do this with;
ifs_pausemenu.lua
ifs_pc_spawnselect.lua
fakeconsole_functions.lua
points.lua
Haven't actually tried this with utility_functions2.lua but it should work.
Last edited by AnthonyBF2 on Sat Mar 05, 2016 4:00 pm, edited 1 time in total.
- commanderawesome
- Field Commander

- Posts: 971
- Joined: Tue Aug 13, 2013 11:58 pm
- Projects :: Skin Changer - Warfront - Other stuff
- xbox live or psn: AaTc_CmdrAwesome
- Location: The Universe
Re: All-Purpose Request Thread (Mk. IV)
Link please.
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: All-Purpose Request Thread (Mk. IV)
http://www.mediafire.com/download/k3ych ... Source.zipcommanderawesome wrote:Link please.
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: All-Purpose Request Thread (Mk. IV)
Great. That way is much easier then my script things. But my mod is finished 
Any way great found. Maybe this will make text removing from HUD easier.
Any way great found. Maybe this will make text removing from HUD easier.
