Changing era icon/name? ***SOLVED***

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Changing era icon/name? ***SOLVED***

Post by Tears2Roses »

I would like to know, how do you change the era's icon? In the instant action mneu, your playable eras icon/name. The problem is, because I am making a sides era for stock maps, the addme is causing problems. For example: I will get the icon/name working, but it will show on my munged world, not mygeeto (mygeeto is my test map). Or the era wont show at all, or SWBF2 crashes before I even get to the profile select screen.

I was talking with Marth8880 on x-fire, but we still couldnt seem to get it working. Yes, I read the 1.3 docs, but it still didnt help (unless I really did something wrong...)
Last edited by Tears2Roses on Wed Nov 23, 2011 10:05 pm, edited 1 time in total.
User avatar
Unlucky13
Sergeant Major
Sergeant Major
Posts: 239
Joined: Mon Jan 24, 2011 11:11 am
Projects :: Models models models
Games I'm Playing :: Random stuff

Re: Chaning era icon/name

Post by Unlucky13 »

What does your addme look like?
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Chaning era icon/name

Post by Tears2Roses »

addme.lua:
Hidden/Spoiler:
[code]--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end

--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

--add my modes to the singleplayer map selection screen

AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_a = 1, mode_con_a = 1,} )

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("myg1","myg1a_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\GUN\\data\\_LVL_PC\\core.lvl")[/code]
Currently, this makes my sides playable on mygeeto. However, it has the BFX icon. This is without attempting to change it to show a different icon using shell/code. I am experimenting with it, so for no good. If someone would know what I should put in my addme to change just the era icon/name and still be playable on mygeeto (without adding an orange mygeeto to the instant action menu) that'd be great. I will experiment with 1.3 docs and what not some more.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Chaning era icon/name

Post by Marth8880 »

Yes, most excellent my dear child.......post your addme's LUA and your shell's REQ, so we may [pauses]...address your situation as we need. In due time, my dear child, in due time will everything come together as the Night Mother has forseen... After you have done this, proceed to Cheydinhal. There you will find...toast...lots and lots of toast...inside games...inside an excellent, inconspicuous, well-achieved forum where you will finally meet your new family.
Hidden/Spoiler:
Dear brother, I do not spread references; I create them.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Chaning era icon/name

Post by THEWULFMAN »

Marth8880 wrote:Yes, most excellent my dear child.......post your addme's LUA and your shell's REQ, so we may [pauses]...address your situation as we need. In due time, my dear child, in due time will everything come together as the Night Mother has forseen... After you have done this, proceed to Cheydinhal. There you will find...toast...lots and lots of toast...inside games...inside an excellent, inconspicuous, well-achieved forum where you will finally meet your new family.
Hidden/Spoiler:
Dear brother, I do not spread references; I create them.


Oblivion references. :runaway: :runaway: :runaway:


Check the 1.3 patch documentation for how to change an era's name and icon. You just need the icon munged in a shell, then load it in your addme. We'll be happy to explain further.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Changing era icon/name?

Post by Tears2Roses »

You know how in HvB 2, you play on stock utapau as zombies. You need to click HvB 2 - utapau in order to play it. Stock utapau is fine, without the sides. Now, in the dark times 2, you can play as the dark times sides and there isnt a second death star map. I want my sides to be like DT2 and not like HvB2. Hopefully this helps.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Changing era icon/name?

Post by AQT »

Please do what WULF suggested, then. Don't just read it; actively read it.

And also:
That's for your DT2/HvB2 comparison.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Changing era icon/name?

Post by [RDH]Zerted »

Put in the change table just as if you weren't using AddNewGameModes():
AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_a = 1, mode_con_a = 1, change = {...},} )
or easier to read:

Code: Select all

AddNewGameModes(
    sp_missionselect_listbox_contents,
    "myg1%s_%s",
    {
        era_a = 1,
        mode_con_a = 1,
        change = {
            --TODO make your era and icon changes here as the v1.3 docs say
        },
    }
)
You and everyone else also needs to create MergeTables() replace AddNewGameModes() using the code here (click here). If you don't, you will wipe out any other changes done to that map from other maps. Also, if other maps didn't make that change, they will wipe out your changes (so you might have had it working, but some other map screwed you). I'm trying to fix this with v1.4, which is one reason I need to rewrite the map selection screens.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Changing era icon/name?

Post by Tears2Roses »

Thanks everyone, I will try everything suggested, hopefully something works :D

EDIT: Thanks, I got it working. Know, how to add it to more than one map properly....

EDIT2: Solved. I coppied over the change table and replaced mygeeto with death star, works like a charm.
Post Reply