Page 1 of 1
Adding loadsreens to already released maps
Posted: Thu Sep 17, 2009 9:07 pm
by Nova Hawk
Hey, I was wondering.. is there a way to add a loadscreen to an already released map? Or maybe update the loadscreen to a map that already has one? Cuz there are a lot of maps in my addon folder that don't contain any loadscreen and I get tired looking at the boring SWBFII logo.
So is there any easy way of doing this? If not, then you can even give me the hard way.
Re: Adding loadsreens to already released maps
Posted: Thu Sep 17, 2009 9:52 pm
by bobfinkl
Just Hex-edit the script to load the Load.lvl, and munge a Load.lvl with your loadscreen. Although never really tried it myself but as far as I'm concerned it's as easy as I explained there.
Re: Adding loadsreens to already released maps
Posted: Fri Sep 18, 2009 1:33 am
by Nova Hawk
Well, I've never done any modding but I'll try your theory. Thanks.
If anyone has any other idea, they are welcome to post it.
Re: Adding loadsreens to already released maps
Posted: Fri Sep 18, 2009 11:45 am
by Par3210
I do! MEMEME. Normally people have to paste their loadscreen over to get it ingame, just find that loadscreen.tga and get your own loadscreen.tga and just replace yours with the first. If there isn't one, well you'd need to hexedit it.
Re: Adding loadsreens to already released maps
Posted: Fri Sep 18, 2009 12:43 pm
by Nova Hawk
And how do I hexedit it?? And what if the maps don't already have a loadscreen? Do I just create a folder called "load" and place my loadscreen in there and save it as .tga?
Re: Adding loadsreens to already released maps
Posted: Fri Sep 18, 2009 1:22 pm
by Maveritchell
Par3210 wrote:I do! MEMEME. Normally people have to paste their loadscreen over to get it ingame, just find that loadscreen.tga and get your own loadscreen.tga and just replace yours with the first. If there isn't one, well you'd need to hexedit it.
WHAT.
...are you talking about? That doesn't make any sense. The only reason "new" loadscreens are added in is because, essentially, the game has one default loadscreen for every map that's not a stock map (called loadscreen.tga). When a person wants to replace this, they munge another .lvl file with a loadscreen.tga loaded in, and then they load that .lvl file to overwrite the game's loadscreen.tga. You can't just "paste" a .tga file anywhere.
Re: Adding loadsreens to already released maps
Posted: Fri Sep 18, 2009 1:53 pm
by Par3210
Well normally when I munge mine I put it in the Load folder in my addon, then my folder, then LVL_PC then Load... and if there is one there I replace it, also adding it to the lua about
ReadDataFile("whatever")...
Re: Adding loadsreens to already released maps
Posted: Fri Sep 18, 2009 1:55 pm
by Maveritchell
Par3210 wrote:Well normally when I munge mine I put it in the Load folder in my addon, then my folder, then LVL_PC then Load... and if there is one there I replace it, also adding it to the lua about
ReadDataFile("whatever")...
See, that makes a little more sense, but it is also what the first reply said to do. If he's talking about adding one to a map that doesn't already use a custom loadscreen, then he's got to hexedit pieces of munged code into the mission.lvl of a premade map (in addition to munging the new loadscreen .lvl), which is not a simple endeavor.
Re: Adding loadsreens to already released maps
Posted: Fri Sep 18, 2009 6:01 pm
by [RDH]Zerted
Maveritchell wrote:...then he's got to hexedit pieces of munged code into the mission.lvl of a premade map (in addition to munging the new loadscreen .lvl), which is not a simple endeavor.
Which is why I promote 'code injection'
(Lua is such a nice fit for swbf2):
Code: Select all
if ReadDataFile == nil then
print("This code was loaded before the game created ReadDataFile(). Please put this at a later point in the loading sequence")
end
ParsReadDataFile = ReadDataFile
function ReadDataFile(...)
--wait for the map to attempt to load it's ingame.lvl
local file = arg[0]
if file == "ingame.lvl" then
print("Pars: Map is attempting to load ingame.lvl, read our loadscreen first")
ParsReadDataFile("../../PAR/loadscreen.lvl")
end
--continue expected program flow
return ParsReadDataFile(unpack(arg))
end
If you can replace the map's addme, then replace it with one adding the same modes for the map, but also with the above code. If you can't, try adding it as a custom server mod (supported by v1.3). I think those scripts run before the map's ScriptPostLoad...