Call a different world file for CTF mode [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
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Call a different world file for CTF mode [Solved]

Post by jangoisbaddest »

I'm trying to make it so that my CTF mode calls a different world file than other modes (ex, conquest uses the KCH world file, but ctf uses the KC3 world file, all in the same mod map directory).

What I've done is set up a world2 folder for my map, saved the world file as KC3, when my map's directory is officially "KCH". Then I went into KC3.req (in the world2 folder), changed all the KCH refrences to KC3. Finally, I changed the line in the KCHc_ctf.lua to say:

ReadDataFile("dc:KCH\\KC3.lvl", "KC3_ctf")

When I tested, there were no cps to spawn on, which likely means the world file didn't load. Then I went into mission reqs and changed KCHc_ctf refrences to KC3c_ctf refrences, went into addme.lua and changed the downloadable content refrence to KC3c_ctf, and finally changed the script name itself from KCHc_ctf to KC3c_ctf. Guess what error I got then? Could not open MISSION\KCHc_ctf.lvl. If I can just find what is still refrencing KCHc_ctf.lvl and change it, I might be in business. Or perhaps I'm on entirely the wrong track. Either way, help is appriciated. Thanks!
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

Re: Worlds, worlds, worlds....

Post by Xavious »

This is how I did it:
It's really simple. Just copy your world1 folder and rename the copy world2. Then you rename your .wld file. After that, just edit the sky and fx stuff in the world2 folder. You can also edit the lighting and ground texture in your second world. Then set up this line in your .lua
ReadDataFile("dc:BC1\\BC1.lvl", "BC1_eli")

like this
ReadDataFile("dc:BC1\\BC2.lvl", "BC1_eli")

That sets it up so you load the environment, lighting, and ground texture from BC2, and the CPs and spawn paths and all that stuff from the BC1_eli layer.

(BC1 and BC2 are just placeholder names for the first and second worlds)
I'd say do it like that, loading environment stuff from your second world, and your CTF stuff from the CTF layer in your first world.
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Re: Worlds, worlds, worlds....

Post by jangoisbaddest »

Awsome! Thank you much, it's working now!

As a side note to others: make sure the KC3 (your new world file you wish to load) req file (in the world2 folder) has the ORIGIONAL world name in the

REQN
{
"lvl"
}

list. It would be ABC_ctf, not AB2_ctf, for example. Thanks again for the help, man!
Post Reply