Adding the KotOR era to custom maps

Discuss and catch up on anything related to the SWBF1 Conversion Pack

Moderator: Moderators

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Adding the KotOR era to custom maps

Postby Maveritchell » Wed Sep 24, 2008 2:07 pm

So you downloaded the Conversion Pack, and you like the KotOR era. "But it's only on the Conversion Pack maps," you say "what if I want it on mine?"

Here's how.

---

There are a few steps:
1) Create your .lua
2) Add in the units you want
3) Set up the addme.lua and misson.req (IMPORTANT)

Step 1: Creating a KotOR .lua
I designed this part to be really easy. All you should need to do to create a KotOR-era .lua is copy a GCW-era .lua and make a few changes.

In this example, we'll say you want to make a conquest .lua.

-You just munged your map (ABC) for the first time. You have in your common\scripts\ABC folder an ABCg_con.lua file.
-Copy ABCg_con.lua and rename it to "ABCk_con.lua"
-Open it up, and find this section:
Code: Select all
    ReadDataFile("SIDE\\all.lvl",
                    "all_inf_rifleman",
                    "all_inf_rocketeer",
                    "all_inf_sniper",
                    "all_inf_engineer",
                    "all_inf_officer",
                    "all_inf_wookiee",
                    "all_hero_hansolo_tat")
                   
    ReadDataFile("SIDE\\imp.lvl",
                    "imp_inf_rifleman",
                    "imp_inf_rocketeer",
                    "imp_inf_engineer",
                    "imp_inf_sniper",
                    "imp_inf_officer",
                    "imp_inf_dark_trooper",
                    "imp_hero_bobafett",
                    "imp_fly_destroyer_dome" )

   ReadDataFile("SIDE\\tur.lvl",
                  "tur_bldg_tat_barge",   
                  "tur_bldg_laser")   
 
   SetupTeams{
      all = {
         team = ALL,
         units = 20,
         reinforcements = 150,
         soldier   = { "all_inf_rifleman",9, 25},
         assault   = { "all_inf_rocketeer",1,4},
         engineer = { "all_inf_engineer",1,4},
         sniper   = { "all_inf_sniper",1,4},
         officer   = { "all_inf_officer",1,4},
         special   = { "all_inf_wookiee",1,4},

      },
      imp = {
         team = IMP,
         units = 20,
         reinforcements = 150,
         soldier   = { "imp_inf_rifleman",9, 25},
         assault   = { "imp_inf_rocketeer",1,4},
         engineer = { "imp_inf_engineer",1,4},
         sniper   = { "imp_inf_sniper",1,4},
         officer   = { "imp_inf_officer",1,4},
         special   = { "imp_inf_dark_trooper",1,4},
      },
   }
   
    SetHeroClass(ALL, "all_hero_hansolo_tat")
    SetHeroClass(IMP, "imp_hero_bobafett")


REPLACE that WHOLE section with the following:

Code: Select all
      SetMemoryPoolSize ("ClothData",20)
    SetMemoryPoolSize ("Combo",50)              -- should be ~ 2x number of jedi classes
    SetMemoryPoolSize ("Combo::State",650)      -- should be ~12x #Combo
    SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Condition",650)  -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Attack",550)     -- should be ~8-12x #Combo
    SetMemoryPoolSize ("Combo::DamageSample",6000)  -- should be ~8-12x #Combo::Attack
    SetMemoryPoolSize ("Combo::Deflect",100)     -- should be ~1x #combo 

    ReadDataFile("SIDE\\rvs.lvl",
       "kor_hero_bandon",
       "kor_hero_jolee",
                "rvs_inf_rbasic",
                "rvs_inf_sbasic",
                "rvs_inf_rheavy",
                "rvs_inf_sheavy",
      "rvs_inf_rmelee",
      "rvs_inf_smelee",
      "rvs_inf_rsupport",
      "rvs_inf_ssupport",
      "rvs_inf_rstealth",
      "rvs_inf_sstealth",
      "rvs_inf_sadept",
      "rvs_inf_radept",
      "rvs_inf_rofficer",
      "rvs_inf_sofficer",
      "rvs_inf_rdroid",
      "rvs_inf_sdroid")

   ReadDataFile("SIDE\\tur.lvl",
                  "tur_bldg_tat_barge",   
                  "tur_bldg_laser")   
 
   SetupTeams{
      rep = {
         team = ALL,
         units = 60,
         reinforcements = 150,
         soldier = { "rvs_inf_rbasic", 7,24},
                   assault = { "rvs_inf_rheavy", 2,8},
                   engineer= { "rvs_inf_rmelee", 2,8},
                   sniper  = { "rvs_inf_rsupport", 2,8},
                   officer = { "rvs_inf_rofficer", 2,8},
         special = { "rvs_inf_rstealth", 1,4},

      },
   }



   SetupTeams{
      imp = {
         team = IMP,
         units = 60,
         reinforcements = 150,
         soldier = { "rvs_inf_sbasic", 7,24},
                   assault = { "rvs_inf_sheavy", 2,8},
                   engineer= { "rvs_inf_smelee", 2,8},
                   sniper  = { "rvs_inf_ssupport", 2,8},
                   officer = { "rvs_inf_sofficer", 2,8},
                   special = { "rvs_inf_sstealth", 1,4},
      },
   }
   
    AddUnitClass(IMP, "rvs_inf_sdroid",1,4)
    AddUnitClass(ALL, "rvs_inf_rdroid",1,4)
    AddUnitClass(ALL,"rvs_inf_radept",1,2)
    AddUnitClass(IMP, "rvs_inf_sadept",1,2)

   
    SetHeroClass(ALL, "kor_hero_jolee")
    SetHeroClass(IMP, "kor_hero_bandon")


That will set you up with the default sides and heroes for the KotOR era.

Another thing to make sure that is correct is sounds - the KotOR era uses GCW-only sounds, which means that you'll be fine with any GCW world sounds - if that world has lightsaber sounds. Not all of them do. By default, a newly munged map will set you up with Tatooine sounds, which is just fine for KotOR. So are any of the following: Coruscant, Dagobah, Death Star, Hoth, Mustafar, Mygeeto, Naboo, Polis Massa, Tantive IV and Tatooine (again).

There, now you've set up your KotOR .lua.

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps (WIP)

Postby Maveritchell » Wed Sep 24, 2008 2:24 pm

Step 2: Adding the units you want

This is the easy and fun step. Adding in KotOR units is the same as adding in units to any other .lua, but of course you'll be wanting to know their names. A list of their names and .req/.odf names:

"rvs_inf_rbasic" - Republic Trooper
"rvs_inf_sbasic" - Sith Trooper
"rvs_inf_rheavy" - Republic Heavy Weapons Specialist
"rvs_inf_sheavy" - Sith Heavy Trooper
"rvs_inf_rmelee" - Republic Swordsman
"rvs_inf_smelee" - Sith Bladesman
"rvs_inf_rsupport" - Republic Field Support
"rvs_inf_ssupport" - Sith Support Trooper
"rvs_inf_rstealth" - Republic Spy
"rvs_inf_sstealth" - Sith Assassin
"rvs_inf_sadept" - Dark Side Adept
"rvs_inf_radept" - Jedi Gunman
"rvs_inf_rofficer" - Republic Captain
"rvs_inf_sofficer" - Sith Lieutenant
"rvs_inf_rdroid" - T3 Unit
"rvs_inf_sdroid" - Sith Warbot
"rvs_inf_hk50" - HK-50
"rvs_inf_jedi" - Jedi Knight
"rvs_inf_sith" - Sith
"rvs_inf_sith_lord" - Sith Lord
"rvs_inf_bmando" - Mandalorian
"rvs_inf_ymando" - Mandalorian
"rvs_inf_rmando" - Mandalorian
(Note that in the above, the blue (bmando) Mandalorian is a stealth unit, the red Mandalorian is a heavy weapons unit, and the yellow Mandalorian is a melee unit)
"rvs_inf_jedi_master" - Jedi Master
"rvs_inf_rpilot" - Republic Pilot
"rvs_inf_spilot" - Sith Pilot
"rvs_inf_twinsuns" - Twin Sun
"rvs_inf_zhug" - Zhug Brother
"rvs_hero_t3m4" - T3-M4
"rvs_hero_exile" - Jedi Exile
"rvs_inf_goto" - G0-T0 Guard Droid
"kor_hero_atton" - Atton Rand
"kor_hero_bandon" - Darth Bandon
"kor_hero_baodur" - Bao-Dur
"kor_hero_calonord" - Calo Nord
"kor_hero_carth" - Carth Onasi
"kor_hero_chuundar" - Chuundar
"kor_hero_hanharr" - Hanharr
"kor_hero_hk47" - HK-47
"kor_hero_jolee" - Jolee Bindo
"kor_hero_malak" - Darth Malak
"kor_hero_mandalore" - Canderous Ordo
"kor_hero_mission" - Mission Vao
"kor_hero_nihilus" - Darth Nihilus
"kor_hero_revan" - Revan
"kor_hero_utharwynn" - Uthar Wynn
"kor_hero_vandar" - Vandar Tokare
"kor_hero_vrook" - Vrook Lamar
"kor_hero_zaalbar" - Zaalbar
"kor_hero_traya" - Darth Traya
"kor_hero_bastila" - Bastila
"kor_hero_kreia" - Kreia
"kor_hero_saul" - Saul Karath
"kor_hero_sion" - Darth Sion
"rvs_hero_mandalore" - Mandalore
"rvs_inf_miner" - Peragus Miner
"rvs_inf_mdroid" - Mining Droid
"rvs_fly_aurek" - Aurek Fighter
"rvs_fly_sith" - Sith Fighter
"rvs_fly_lwing" - S-250 Chela
"rvs_inf_ndroid" - T3-Unit
(Note that the above T3 unit is the same as the "rdroid", except that it has no sheild and has a different texture.)

Now you have to make sure that their localization is going to be correct. First, download this file (317KB "core.lvl"):
https://www.mediafire.com/?cr8dfwbs6nveps2

Paste that file into your GameData\addon\ABC\data\_LVL_PC\ABC folder (the same folder "ABC.lvl" - the world, not the sides - will be in)

Now open up your .lua and find the line:
Code: Select all
ScriptCB_DoFile("setup_teams")

Right below that, paste:
Code: Select all
ReadDataFile("dc:ABC\\core.lvl")

And remember that in all these cases "ABC" needs to be changed to the 3-letter ID of your map. Save your .lua.

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps (WIP)

Postby Maveritchell » Wed Sep 24, 2008 2:36 pm

Step 3: Set up the addme.lua and mission.req

Okay, this part may seem a little unfamiliar, but it isn't too tough and it's vital that you do this, otherwise your new KotOR era won't show up at all ingame.

First, browse to data_ABC\addme and open "addme.lua" You'll see a section that looks a little like this:
Code: Select all
sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "ABC%s_%s", era_g = 1, mode_con_g = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

What you want to do first is change it, so that it looks like this (again, remember this is just for conquest, although the same principles apply for any mode)
Code: Select all
sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "ABC%s_%s", era_g = 1, era_k = 1, mode_con_g = 1, mode_con_k = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]


Now look a little further down to where it has a line that says:
Code: Select all
AddDownloadableContent("ABC","ABCg_con",4)

Add another line that says this:
Code: Select all
AddDownloadableContent("ABC","ABCk_con",4)


Both of the above must be done in the addme, so doublecheck to make sure you did it right.

Now, we'll move on to setting up the mission.req.

First, browse to data_ABC\common\mission. There are a lot of .req files in here, but there should be one called ABCg_con.req in there somewhere. Copy it and rename it to "ABCk_con.req" and then open it up. It'll say "ABCg_con" under "script" - so change that to "ABCk_con".

Save that, then go back to data_ABC\common. Open up the file called "mission.req". There will be a section that lists all your modes which will look something like this:
Code: Select all
    REQN
    {
        "lvl"
        "ABCg_con"
    }

Add another line "ABCk_con" underneath that, so that it looks like this:
Code: Select all
    REQN
    {
        "lvl"
        "ABCg_con"
   "ABCk_con"
    }


Now save that.

---

Alright! As long as you did everything correctly, and as long as you have the Conversion Pack installed, the next time you munge your map you'll have access to the brand new KotOR era - in your own brand new map!

Jedi
User avatar
Posts: 1105
Joined: Tue Jan 30, 2007 6:04 am
Location: Germany
Projects :: Inactive

Re: Adding the KotOR era to custom maps

Postby Aman/Pinguin » Wed Sep 24, 2008 2:46 pm

Hehe doing this right now.
Everything looks good, a weapon list would be nice for localizing though. :)
But I will just look ingame what the names are.

Thanks for this tut' Mav'. :)

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps

Postby Maveritchell » Wed Sep 24, 2008 3:20 pm

Fixed so that you don't have to localize everything (I had to make sure that the solution I posted wouldn't overwrite any other localizations you made).

Jedi
User avatar
Posts: 1062
Joined: Sun Sep 07, 2008 6:25 pm
Location: RCC Institute of Technology
Games I'm Playing :: SWBFII-ES5-BL2
xbox live or psn: No gamertag set

Re: Adding the KotOR era to custom maps

Postby RED51 » Wed Sep 24, 2008 4:24 pm

Didn't know where else to post this Q, so I guess it goes here. What lvl file are the RCs and extra cis units are under, and what do I put in my lua? Also, What sound file are the RCs weapons fire sound are in and how do I get them in my map? Oh, and also tell me what the extra rebel and imp units are called too.

I'll post a separate topic for that.

Sith
User avatar
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Location: The lost world of pickels

Re: Adding the KotOR era to custom maps

Postby woner11 » Wed Sep 24, 2008 7:18 pm

Is there anyway to modify the units or is that with assets?

Gametoast Staff
User avatar
Posts: 2966
Joined: Sun Feb 26, 2006 7:36 am
Location: USA
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set

Re: Adding the KotOR era to custom maps

Postby [RDH]Zerted » Wed Sep 24, 2008 10:24 pm

You can always do simple edits in the Lua with SetProperty() and SetClassProperty(). If you want to do extensive edits, then yes you'd need to source files.

Sigh, another 'How to Add Game Mode/Era Tutorial'. I really should of made that era/game mode tool...

Sith
User avatar
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Location: The lost world of pickels

Re: Adding the KotOR era to custom maps

Postby woner11 » Sun Sep 28, 2008 8:32 pm

Is this the same for all other eras, for instance Old Sith Wars (except you change the "k" to "o"), or does it require a different core.lvl?

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps

Postby Maveritchell » Sun Sep 28, 2008 9:33 pm

The principles behind adding a new era are the same for any era, yes. The only reason I have the downloadable core.lvl is because all ~60 unit/vehicle localizations plus the innumerable weapon localizations are already munged into that. It's just a convenience thing.

Sith
User avatar
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Location: The lost world of pickels

Re: Adding the KotOR era to custom maps

Postby woner11 » Sun Sep 28, 2008 11:03 pm

Well, I got KotOR to work, but then when I changed ABCk_con to ABCo_con in the lua, addme and mission.req the game got a fatal error. Any ideas what I did wrong. Also let me know if this should be moved to modding instead. :yes:

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps

Postby Maveritchell » Sun Sep 28, 2008 11:45 pm

From the list you made, it sound like you didn't edit (or recreate) the "ABCo_con.req" file in the mission folder.

Sith
User avatar
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Location: The lost world of pickels

Re: Adding the KotOR era to custom maps

Postby woner11 » Mon Sep 29, 2008 6:48 pm

I opened the mission req and changed it as well as renaming it. I'll double check and see what I can find.

Edit: I fixed it, I was thinking of the wrong mission req. I was thinking of the ones inside the mission folder.

Private Recruit
User avatar
Posts: 29
Joined: Sat Jul 19, 2008 2:58 pm

Re: Adding the KotOR era to custom maps

Postby Darth Skraal » Sat Jan 03, 2009 4:58 pm

I did that, and it removed Clone wars era from my map! What do I do to restore it?

EDIT: Fixed that. You need to add the lines
Code: Select all
era_c = 1,
and
Code: Select all
mode_con_c = 1,
to get clone wars to show up.

The PC Mungelog said this:
Code: Select all
ERROR[localizemunge French.cfg]:Text file syntax error. (No matching bracket)ERROR[localizemunge French.cfg]:Text file syntax error. (No matching bracket) [continuing]
   2 Errors    0 Warnings



I tried to load my KoToR era and it crashed with a FATAL: Could not open MISSION\321k_con.lvl

All that my BFront2.log says is:
Code: Select all
Opened logfile BFront2.log  2009-01-03 1612
What do I do?

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps

Postby Maveritchell » Sat Jan 03, 2009 5:37 pm

Good question, what did you do?

Private Recruit
User avatar
Posts: 29
Joined: Sat Jul 19, 2008 2:58 pm

Re: Adding the KotOR era to custom maps

Postby Darth Skraal » Sat Jan 03, 2009 5:39 pm

I added the lines era_c = 1, and mode_con_c = 1, to the addme.lua.

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps

Postby Maveritchell » Sat Jan 03, 2009 5:43 pm

Darth Skraal wrote:I added the lines era_c = 1, and mode_con_c = 1, to the addme.lua.

And where does my tutorial say to do that?

Even if it did (although it does not), just doing those things wouldn't cause any errors unless you made some different mistakes.

Master Sergeant
User avatar
Posts: 172
Joined: Wed Jun 23, 2010 8:25 pm

Re: Adding the KotOR era to custom maps

Postby ps2owner » Fri Oct 01, 2010 10:02 pm

link does'nt work...

Jedi Admin
User avatar
Posts: 7388
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding the KotOR era to custom maps

Postby Maveritchell » Sat Oct 02, 2010 12:04 am

ps2owner wrote:link does'nt work...

Link's been fixed in the original post:
http://www.filefront.com/17341423/core.lvl

Master Sergeant
User avatar
Posts: 172
Joined: Wed Jun 23, 2010 8:25 pm

Re: Adding the KotOR era to custom maps

Postby ps2owner » Sat Oct 16, 2010 2:43 pm

this should be in the everything you need thread

Next

Return to SWBF1 Conversion Pack

Who is online

Users browsing this forum: No registered users and 1 guest