how to edit custom campaign name above planet ? (solved)

Started by wsa30h, July 14, 2020, 10:18:54 AM

Previous topic - Next topic
i tried everything added the entries in the same way and place as the stock campaigns tried changing my campaign name and reference a stock nothing works all i get is stupid question marks above the planet. something else must reference it outside of the shell and core lvl but what ?
mods and maps in progress:<br />--Bf1 expanded edition 3.0 version
-- bf1 tcw battles
-- bf1 seasons mod season 1
-- bf2 expanded edition tbh

July 14, 2020, 11:05:06 AM #1 Last Edit: July 14, 2020, 11:06:42 AM by Dark_Phantom
[spoiler]ifs_sp_briefing
Code (lua) Select
for k,v in metagame_state.planets do
if(Planet3 == v.MapName) then
gCurCampaign[i].PlanetStr = v.LocalizeName
end
end
in metagame_state
Code (lua) Select
planets = {
bespin = {
-- constants
MapName = "BES", -- 3-char name for base map name
LocalizeName = "planets.bespin.name",
-- fnGetBonusText = metagame_state_fnGetBonusText_bespin,
chargemax = 1,
ShortBonusText = "planets.bespin.shortbonus",
LongBonusText = "planets.bespin.longbonus",
MapName1 = "planets.bespin.mapname1", -- localization key to first map
MapName2 = "planets.bespin.mapname2", -- localization key to second map
RotateSpeed = 0.5,
ModelScale = 0.183,
BonusType = "Sabotage",

-- variables (must be saved)
-- owner = 0, -- 0= unassigned, 1 = left, 2 = right
charge = 1, -- charge level
pickorder = 2, -- 1 = picked first, 2 = second, etc
}, add your planet here
[/spoiler]

I traced the screen ifs_sp_briefing, which showed me that your string is gCurCampaign[i].PlanetStr.  It's looping through Metagame_state.planets (this second section) to find a name.  You don't need all the stuff it calls for metagame code, all you should need to add is mapname and localizename.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

thanks phantom i will let you know if it works after i try this i have a feeling it might.
mods and maps in progress:<br />--Bf1 expanded edition 3.0 version
-- bf1 tcw battles
-- bf1 seasons mod season 1
-- bf2 expanded edition tbh

thank you so much phantom it works perfectly.
mods and maps in progress:<br />--Bf1 expanded edition 3.0 version
-- bf1 tcw battles
-- bf1 seasons mod season 1
-- bf2 expanded edition tbh