common.req
Custom Era Icon [Solved]
Moderator: Moderators
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Custom Era Icon [Solved]
I've followed the instructions for changing the name of an era in the addme.lua and that worked no problem, but I can't get the icon to change - it stays as the regular Conquest icon. Here's my addme:
I have both the ingame.lvl and common.lvl loaded because both of those were suggested as possible solutions in THIS thread. Here are my common.req and ingame.req files:
common.req
ingame.req
My texture is a 32x32 tga with a black/white alpha channel, pretty much just a redesigned version of the imp_icon.tga. I've tried putting the texture in interface, interface/PC, mshs, and mshs/PC, and I can't get it. What am I doing wrong?
Hidden/Spoiler:
common.req
Hidden/Spoiler:
Hidden/Spoiler:
Last edited by jedimoose32 on Tue Mar 10, 2015 2:48 pm, edited 1 time in total.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Custom Era Icon
Try loading the .lvl file with the texture in it before you call for the texture.
And incidentally (it shouldn't really matter), doesn't the 1.3 patch tutorial call for a custom shell.lvl to be made for this kind of thing? Surprised you're loading it in through the ingame.lvl.
And incidentally (it shouldn't really matter), doesn't the 1.3 patch tutorial call for a custom shell.lvl to be made for this kind of thing? Surprised you're loading it in through the ingame.lvl.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Custom Era Icon
I have yet to see any mention of a custom shell.lvl being required to do this. I've read a handful of threads here on the forums and combed through the official 1.3 documentation, and it doesn't mention a custom shell. If you're sure, then can you point me in the right direction?
I've currently got the common.lvl being loaded before the sp_missionselect_listbox_contents bit as you can see in the addme I posted. I'll try moving the ingame.lvl up there too I guess. Edit: Didn't work.
I've currently got the common.lvl being loaded before the sp_missionselect_listbox_contents bit as you can see in the addme I posted. I'll try moving the ingame.lvl up there too I guess. Edit: Didn't work.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Custom Era Icon
I just did a quick check using exactly the same settings you had, and there's nothing in your setup that's wrong (i.e. I munged an "empty" ingame.lvl with only the texture, added it to any 'ol subfolder - mshs, and then added it to the addme). It's probably your texture, given all of that. What's the size of the .lvl file you create, and are you making sure that it's actually present in the addon/MODID folder?
-
thelegend
- Sith

- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: Custom Era Icon
As far as I know when you load your icon in a common.lvl file then it must be in the addme.lua. Exactly like the core.lvl. By the way actually ingame.lvl files must be load in your main lua. Am I right? I always let this lua read the ingame.lvl, never the addme.lua. I am probably wrong.
My era icon works. I put the texture in the same folder where the other era texturers are loaded.
Then I create a common.lvl (the .req file is the same as yours) and then I put the ReadDataFile in the addme.lua. After that I copy the munged common.lvl into my Addon Map's folder.
Edit: Forget what I wrote. It's awful to write on a cell phone. Anyway, I have not looked through your addme.lua properly. Your title says you want to change your era icon. But your addme can't read the conquest icon? So...If you want to change the era + the conquest Icon then you need to change the following lines: (I put the following lines from my addme.lua)
As you can see I changed two modes. But it doesn't matter. To change the era icon you also need to add "era_c = {name..."
You also need to load up your common.lvl below this line:
Here's my addme.lua. All the icons work for me, so..
I put my icon files into my Interface folder. Just by the way your common.req looks fine to me.
My era icon works. I put the texture in the same folder where the other era texturers are loaded.
Then I create a common.lvl (the .req file is the same as yours) and then I put the ReadDataFile in the addme.lua. After that I copy the munged common.lvl into my Addon Map's folder.
Edit: Forget what I wrote. It's awful to write on a cell phone. Anyway, I have not looked through your addme.lua properly. Your title says you want to change your era icon. But your addme can't read the conquest icon? So...If you want to change the era + the conquest Icon then you need to change the following lines: (I put the following lines from my addme.lua)
Code: Select all
sp_missionselect_listbox_contents[sp_n+1] = { red = 85, green = 85, blue = 85, isModLevel = 1, mapluafile = "AWM%s_%s", era_p = 1, mode_con_p = 1, mode_eli_p =1,
change = {
era_p = { name="Pirates of the Caribbean", icon2="p_era_icon" },
mode_con = { name="Duel Mode", icon="duel_icon", about="Duel Mode - Maelstrom: Captain Jack Sparrow has started a duel against the cruel captain of the Flying Dutchman." },
mode_eli = { name="Battle Mode", icon="battle_icon", about="Battle Mode - Maelstrom: The Crews of the Black Pearl and the Flying Dutchman fight eachother to win the final battle" },
},
}
You also need to load up your common.lvl below this line:
Code: Select all
ReadDataFile("..\\..\\addon\\JER\\data\\_LVL_PC\\core.lvl") Hidden/Spoiler:
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Custom Era Icon
No. A .lvl file is an .lvl file is an .lvl file. They all use the same .req structure, and the name of the file is academic.thelegend wrote:As far as I know when you load your icon in a common.lvl file then it must be in the addme.lua. Exactly like the core.lvl. By the way actually ingame.lvl files must be load in your main lua. Am I right?
Edit: although it's worth mentioning (I didn't see it until it was emphasized in the above post) - I don't know if the 1.3 patch supports changing the default modes. You may want to try using a non-conquest mode, in addition to verifying your texture is being munged correctly.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Custom Era Icon
Thanks for your help guys. I got it working. I changed
to...
(removed the '2', even though I saw in a few threads that people were using 'icon2')
Mav, interestingly enough it is actually fine in this case to load common.lvl at the bottom of the addme, even though the texture is called above it.
Code: Select all
icon2 = "assassinmode"Code: Select all
icon = "assassinmode"Mav, interestingly enough it is actually fine in this case to load common.lvl at the bottom of the addme, even though the texture is called above it.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Custom Era Icon [Solved]
The texture isn't used until much later in the loading process when the game generates all the era checkboxes. Sometime after all the addons have been processed. You could load assets up until that point. In the addme, you're simply storing the icon's name for later reference.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Custom Era Icon [Solved]
Huh. So the addme.lua for every stock and mod map gets loaded right away when you're starting the game? And then the shell gathers everything up and sticks it together in the table. That makes sense given my limited knowledge of the shell I guess.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Custom Era Icon [Solved]
Stock maps don't have addmes. Their values are directly in a large table defined within the shell.
It's more the addmes gather everything up. Look at your addme closely, you're directly adding your map's info into this table: sp_missionselect_listbox_contents. Later on the shell looks through that table and builds all the GUI controls it needs.
It's more the addmes gather everything up. Look at your addme closely, you're directly adding your map's info into this table: sp_missionselect_listbox_contents. Later on the shell looks through that table and builds all the GUI controls it needs.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Custom Era Icon [Solved]
Right, I guess I could have worded that better. The addmes add (go figure) the map's stuff to the table. The shell reads the table and displays its contents.
Interesting about the stock maps. I guess that makes more sense than making each one have an addme.
Interesting about the stock maps. I guess that makes more sense than making each one have an addme.
