SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Rayce on September 23, 2013, 09:21:05 AM

Title: Help with eras
Post by: Rayce on September 23, 2013, 09:21:05 AM
I read the tutorial by Buckler/Sleepkiller/Phobos about adding eras (here (http://www.swbfgamers.com/index.php?topic=5021.0)) but i'm still not sure what to do, can someone please explain it further?
Title: Re: Help with eras
Post by: Dark_Phantom on September 23, 2013, 11:26:43 AM
Well, let me pull out my notes... (links not included yet)
First of all, you need the lua scripts.  They are located in the downloads under 'Lua 4.0.1 decompiling, etc' or they are located in Phobo's Complete Shell and Common Builders.  I recommend the builders for ease of usage.
Then, you need Battlebelk's mission builder.
----Reqs and lua can be opened in any text editor.

Now, before you even go diving into this wonderful world, please be warned:  You should have some basic or above basic knowledge of programming languages and such.  Lua is very readable, but you can really screw up stuff and have to start over if something is done really wrong.

My way is slightly different from Sleepkiller's way, so bear with me.
1.) Open up your ifs_sp_era.lua in the shell.lvl.
   ----Scroll down to the bottom and you will see this:
ifs_sp_era_vbutton_layout = {
-- yTop = -70,
xWidth = 350,
width = 350,
xSpacing = 10,
ySpacing = 5,
font = "gamefont_medium",
buttonlist = {
{ tag = "new", string = "common.era.cw", },
{ tag = "classic", string = "common.era.gcw", },
},
title = "ifs.sp.pick_era",
    rotY = 35,
}

The key here is "Buttonlist".  To make a new button, copy and paste this directly after the 3rd comma, 2nd line in buttonlist:
Quote{ tag = "YOUR ERA CODE HERE", string = "What you want the screen to say",},

It should look like this:
   buttonlist = {
{ tag = "new", string = "common.era.cw", },
{ tag = "classic", string = "common.era.gcw", },
                              { tag = "YOUR ERA CODE HERE (no spaces)", string = "What you want the screen to say",},
},

Remember what you put in for your era code.  Write it down or use your photographic memory.  It's very important.

2.)  Open up the missionlist.lua in Shell.
  ----You actually may be able to skip this part due to you just put it in ifs_sp_era.  Haven't really tested other than to get more eras showing for stock maps.
sp_missionselect_listbox_contents = {
{ mapluafile = "BES1", showstr = "planets.bespin.mapname1", side_r = 1, side_a = 1},
{ mapluafile = "BES2", showstr = "planets.bespin.mapname2", side_r = 1, side_a = 1},

Add this to make 3 eras:
side_(x) ---- x is whatever you want it to be, just keep it consistent.
Looks like this now:
sp_missionselect_listbox_contents = {
{ mapluafile = "BES1", showstr = "planets.bespin.mapname1", side_r = 1, side_a = 1, side_x = 1},
{ mapluafile = "BES2", showstr = "planets.bespin.mapname2", side_r = 1, side_a = 1, side_x = 1},


Coolio, now the basics of the shell.lvl are done.  Munge and move forward.

3.)  Open up Battlebelk's mission builder.
   ---- This may be the trickiest part.  You must successfully add all req files correctly or your game will not load your new era.  So:
In the main folder of the builder with "_lvl_pc", "addon", "bin", etc,  open up the "reqs" folder.
  First, you will see "sub_lvls" and "mission.req".  Open up mission req and you will see many levels.  Go here:
        "lvl"
        "bes1a"
        "bes1a_h"
"bes1r"
"bes2a"
"bes2a_h"
"bes2r"

Add your lines like this...:
VERY IMPORTANT
I told you to write down earlier the YOUR ERA CODE HERE.  Now you use it.  I'm going to use xix for era code.
        "lvl"
        "bes1a"
        "bes1a_h"
"bes1r"
               "bes1xix"
"bes2a"
"bes2a_h"
"bes2r"
"bes2xix"

Save and go to "SubLvls" now.  Copy and paste any req (preferably just a bespin one, it doesn't matter much really.)
Open, and change the name of the lvl in there to "bes1x".  Save under the name "bes1x.req"  Do the same for all levels you are adding.  Then, go into the Mission.lvl builder, and create your lua in the respective folder and munge.

(WIP tutorial.  I'm using a different method currently for addon map implementation but this one has worked for me in the past and it's fairly simple, but unfinished.  Any questions about specific scripts and such, PM me.  If it's about 3rd era or something unclear, I will revise it.)
Title: Re: Help with eras
Post by: Rayce on September 29, 2013, 06:28:10 PM
Thanks for the help. BTW, how many new eras can you have at once?
Title: Re: Help with eras
Post by: Dark_Phantom on September 29, 2013, 06:35:58 PM
Quote from: CommanderAwesome on September 29, 2013, 06:28:10 PM
Thanks for the help. BTW, how many new eras can you have at once?
Untested.  Probably as many as you can fit on the page.
Title: Re: Help with eras
Post by: Rayce on October 22, 2013, 08:25:37 PM
The eras aren't showing up, here are the scripts:
[spoiler=ifs_sp_era.lua]--function ifs_sp_era_fnDidDifficulty()
--   ScriptCB_SetIFScreen("ifs_sp_briefing")
--end

ifs_sp_era = NewIFShellScreen {
   movieIntro      = nil,
   movieBackground = nil,
   
--   title = NewIFText {
--      string = "ifs.sp.pick_era",
--      font = "gamefont_large",
--      textw = 460,
--      ScreenRelativeX = 0.5, -- center
--      ScreenRelativeY = 0.5, -- top
--   },

   buttons = NewIFContainer {
      ScreenRelativeX = 0.5, -- center
      ScreenRelativeY = 0.5, -- top
      y = 20, -- go slightly down from center
   },

   Enter = function(this, bFwd)
      gIFShellScreenTemplate_fnEnter(this, bFwd) -- call default enter function

      if(bFwd and ScriptCB_IsSPStateSaved()) then
            ifs_movietrans_PushScreen(ifs_sp_briefing)
      end
   end,

   Input_Accept = function(this)
      -- If base class handled this work, then we're done
      if(gShellScreen_fnDefaultInputAccept(this)) then
         return
      end

      ifelm_shellscreen_fnPlaySound(this.acceptSound)
      ifs_sp_briefing.era = this.CurButton
      if( bFwd ) then
         ScriptCB_PushScreen("ifs_sp_briefing")
      else
         ifs_movietrans_PushScreen(ifs_sp_briefing)
      end
   end,
}

ifs_sp_era_vbutton_layout = {
--   yTop = -70,
   xWidth = 350,
   width = 350,
   xSpacing = 10,
   ySpacing = 5,
   font = "gamefont_medium",
   buttonlist = {
      { tag = "new", string = "common.era.cw", },
      { tag = "classic", string = "common.era.gcw", },
                              {tag = "lcw", string = "Late Clone Wars", },
   },
   title = "ifs.sp.pick_era",
       rotY = 35,
}

ifs_sp_era.CurButton = AddVerticalButtons(ifs_sp_era.buttons,ifs_sp_era_vbutton_layout)
AddIFScreen(ifs_sp_era,"ifs_sp_era")[/spoiler]
[spoiler=missionlist.lua]-- List of missions presented to the user for IA/MP/splitscreen/etc.
-- This list is kept in alphabetical order (in English, anyhow).
--
-- Each entry should be in the following form:
-- {    -- starts a table entry
--   mapluafile = "END1", -- base name of map, w/o attacking side, no ".lua" either
--   showstr = "planets.endor.name1", -- localization key in DB of item to show
--   side_a = 1,  -- [OPTIONAL] Put this in the table if there is a "a" version of the map
--   side_c = 1,  -- [OPTIONAL] Put this in the table if there is a "c" version of the map
--   side_i = 1,  -- [OPTIONAL] Put this in the table if there is a "i" version of the map
--   side_r = 1,  -- [OPTIONAL] Put this in the table if there is a "r" version of the map
--   side_a_team1 = "common.sides.all.name" -- [OPTIONAL] -- localized name of team1 in an 'a' version of this map
--   side_a_team2 = "common.sides.imp.name" -- [OPTIONAL] -- localized name of team2 in an 'a' version of this map
--    -- Note, there's also OPTIONAL side_c_team1, side_i_team1, side_r_team1,
--    -- side_c_team2, side_i_team2, side_r_team2 fields.
--
-- },   -- ends a table entry
--
-- Below, things are in one-entry-per-line format to make it easier to
-- comment in/out maps by commenting in/out a single line


-- Names for the attacking team. Entries must have same tags as the
-- next list, and the button layout list
gMissionSelectAttackerTeams = {
   a = "common.sides.all.name",
   i = "common.sides.imp.name",
   r = "common.sides.rep.name",
   c = "common.sides.cis.name",
}

gMissionSelectDefenderTeams = {
   a = "common.sides.imp.name",
   i = "common.sides.all.name",
   r = "common.sides.cis.name",
   c = "common.sides.rep.name",
}

-- For making the 'seal_XXX' name
gExpandedSideNames = {
   a = "all",
   i = "imp",
   r = "rep",
   c = "cis",
}

sp_missionselect_listbox_contents = {
   { mapluafile = "BES1", showstr = "planets.bespin.mapname1", side_r = 1, side_a = 1, side_l = 1},
   { mapluafile = "BES2", showstr = "planets.bespin.mapname2", side_r = 1, side_a = 1, side_l = 1},

   { mapluafile = "END1", showstr = "planets.endor.mapname1", side_a = 1, side_l = 1},

   { mapluafile = "GEO1", showstr = "planets.geonosis.mapname1", side_r = 1, side_l = 1},

   { mapluafile = "HOT1", showstr = "planets.hoth.mapname1", side_i = 1, side_l = 1},

   { mapluafile = "KAM1", showstr = "planets.kamino.mapname1", side_c = 1, side_l = 1},

   { mapluafile = "KAS1", showstr = "planets.kashyyyk.mapname1", side_c = 1, side_i = 1, side_l = 1},
   { mapluafile = "KAS2", showstr = "planets.kashyyyk.mapname2", side_c = 1, side_i = 1, side_l = 1},

   { mapluafile = "NAB1", showstr = "planets.naboo.mapname1", side_c = 1, side_i = 1, side_l = 1},
   { mapluafile = "NAB2", showstr = "planets.naboo.mapname2", side_c = 1, side_a = 1, side_l = 1},

   { mapluafile = "RHN1", showstr = "planets.rhenvar.mapname1", side_r = 1, side_i = 1, side_l = 1},
   { mapluafile = "RHN2", showstr = "planets.rhenvar.mapname2", side_c = 1, side_a = 1, side_l = 1},

   { mapluafile = "TAT1", showstr = "planets.tatooine.mapname1", side_r = 1, side_i = 1, side_l = 1},
   { mapluafile = "TAT2", showstr = "planets.tatooine.mapname2", side_r = 1, side_i = 1, side_l = 1},

   { mapluafile = "YAV1", showstr = "planets.yavin.mapname1", side_c = 1, side_i = 1, side_l = 1},
   { mapluafile = "YAV2", showstr = "planets.yavin.mapname2", side_r = 1, side_i = 1, side_l = 1},

}

mp_missionselect_listbox_contents = {
   { mapluafile = "BES1", showstr = "planets.bespin.mapname1", side_r = 1, side_a = 1, side_l = 1},
   { mapluafile = "BES2", showstr = "planets.bespin.mapname2", side_r = 1, side_a = 1, side_l = 1},

   { mapluafile = "END1", showstr = "planets.endor.mapname1", side_a = 1, side_l = 1},

   { mapluafile = "GEO1", showstr = "planets.geonosis.mapname1", side_r = 1, side_l = 1},

   { mapluafile = "HOT1", showstr = "planets.hoth.mapname1", side_i = 1, side_l = 1},

   { mapluafile = "KAM1", showstr = "planets.kamino.mapname1", side_c = 1, side_l = 1},

   { mapluafile = "KAS1", showstr = "planets.kashyyyk.mapname1", side_c = 1, side_i = 1, side_l = 1},
   { mapluafile = "KAS2", showstr = "planets.kashyyyk.mapname2", side_c = 1, side_i = 1, side_l = 1},

   { mapluafile = "NAB1", showstr = "planets.naboo.mapname1", side_c = 1, side_i = 1, side_l = 1},
   { mapluafile = "NAB2", showstr = "planets.naboo.mapname2", side_c = 1, side_a = 1, side_l = 1},

   { mapluafile = "RHN1", showstr = "planets.rhenvar.mapname1", side_r = 1, side_i = 1, side_l = 1},
   { mapluafile = "RHN2", showstr = "planets.rhenvar.mapname2", side_c = 1, side_a = 1, side_l = 1},

   { mapluafile = "TAT1", showstr = "planets.tatooine.mapname1", side_r = 1, side_i = 1, side_l = 1},
   { mapluafile = "TAT2", showstr = "planets.tatooine.mapname2", side_r = 1, side_i = 1, side_l = 1},

   { mapluafile = "YAV1", showstr = "planets.yavin.mapname1", side_c = 1, side_i = 1, side_l = 1},
   { mapluafile = "YAV2", showstr = "planets.yavin.mapname2", side_r = 1, side_i = 1, side_l = 1},
}

-- List of maps usable in attract mode. These should be the raw lua
-- filenames (without ".lua"), and one per line, so we can turn them
-- on/off easily. Historical missions could go in here if desired.
attract_mode_maps = {
   "bes1a",
   "bes1r",
   "bes2a",
   "bes2r",
   "end1a",
   "geo1r",
   "hot1i",
   "kam1c",
   "kas1c",
   "kas1i",
   "kas2c",
   "kas2i",
   "nab1c",
   "nab1i",
   "nab2a",
   "nab2c",
   "rhn1i",
   "rhn1r",
   "tat1i",
   "tat1r",
   "tat2i",
   "tat2r",
   "yav1c",
   "yav1i",
   "yav2i",
   "yav2r",

   -- Historical maps, off by default
   "nab1c_h",
   "nab2c_h",
   "kas1c_h",
   "geo1r_h",
   "kam1c_h",
   "rhn1r_h",
   "kas2c_h",
   "tat1i_h",
   "tat2i_h",
   "rhn2a_h",
   "yav2i_h",
   "yav1i_h",
   "hot1i_h",
   "bes2a_h",
   "bes1a_h",
   "end1a_h",
}


-- Singleplayer campaigns. Each of these tables has a set of
-- sub-tables, one sub-table per mission. These are run through in
-- order. Note: there is a max of 255 missions in a campaign. Todo:
-- add in listings for VOs, backgrounds, etc.
--
-- Optional params per line:
--   side = 2,    -- forces the user to team 2 (defender). If omitted, team 1 (attacker) is forced
--   intromovie = "", --movie played before yoda
--   outtromovie = "", --movie played after yoda, before mission
--   exitmovie = "", --movie played after mission is done (and you win)
-- [More will be coming, which refer to text to print, voiceover, etc.]

SPCampaign_CW = {
   --Player is CIS
   {
      mapluafile = "nab1c_h",
      side = 1,
      showstr = "ifs.sp.cw.map1name",
      description = "ifs.sp.cw.map1descr",
      movie = "nab1fly",
      voiceover = "cis_missionbriefing_nab1",
      intromovie = "nab1h01",
--no tutorials on the pc
--      outtromovie = "tutorial01cw",
--      outtromovie_left = 90,
--      outtromovie_top = 60,
--      outtromovie_width = 460,
--      outtromovie_height = 350,
--      outtromovielocalized = 1,
      briefingmusic = "shell_droidinvasion",
      iconmodel = "com_icon_CIS"
   }, --Player is CIS
   {
      mapluafile = "nab2c_h",
      side = 1,
      showstr = "ifs.sp.cw.map2name",
      description = "ifs.sp.cw.map2descr",
      movie = "nab2fly",
      voiceover = "cis_missionbriefing_nab2",
      outtromovie = "nab2h01",
      briefingmusic = "shell_droidinvasion",
      --unlockable = 1,
      iconmodel = "com_icon_CIS"
   }, --Player is CIS
   {
      mapluafile = "kas1c_h",
      side = 1,
      showstr = "ifs.sp.cw.map3name",
      description = "ifs.sp.cw.map3descr",
      movie = "kas1fly",
      voiceover = "cis_missionbriefing_kas1",
      briefingmusic = "shell_droidinvasion",
      --unlockable = 2,
      iconmodel = "com_icon_CIS"
   },

   --Player is Republic
   {
      mapluafile = "geo1r_h",
      side = 1,
      showstr = "ifs.sp.cw.map4name",
      description = "ifs.sp.cw.map4descr",
      movie = "geo1fly",
      outtromovie = "geo1h01",
      voiceover = "rep_missionbriefing_geo1",
      briefingmusic = "shell_clonewars",
      --unlockable = 3,
      iconmodel = "com_icon_republic"
   },
   
   --Player is Republic
   {
      mapluafile = "kam1c_h",
      side = 2,
      showstr = "ifs.sp.cw.map5name",
      description = "ifs.sp.cw.map5descr",
      movie = "kam1fly",
      intromovie = "kam1h01",
      outtromovie = "kam1h02",
      voiceover = "rep_missionbriefing_kam1",
      briefingmusic = "shell_clonewars",
      --unlockable = 4,   
      iconmodel = "com_icon_republic"
   },--Player is Republic
   {
      mapluafile = "rhn1r_h",
      side = 1,
      showstr = "ifs.sp.cw.map6name",
      description = "ifs.sp.cw.map6descr",
      movie = "rhn1fly",
      voiceover = "rep_missionbriefing_rhn1",
      briefingmusic = "shell_clonewars",
      --unlockable = 5,
      iconmodel = "com_icon_republic"
   },--Player is Republic
   {
      mapluafile = "kas2c_h",
      side = 2,
      showstr = "ifs.sp.cw.map7name",
      description = "ifs.sp.cw.map7descr", side = 2,
      movie = "kas2fly",
      voiceover = "rep_missionbriefing_kas1",
      briefingmusic = "shell_clonewars",
      exitmovie = "kas2h01",
      iconmodel = "com_icon_republic"
   },--Player is Republic
}

SPCampaign_GCW = {
   --Player is the Empire
   {
      mapluafile = "tat1i_h",
      side = 1,
      showstr = "ifs.sp.gcw.map1name",
      description = "ifs.sp.gcw.map1descr",
      movie = "tat1fly",
      intromovie = "tat1h01",
-- no tutorials on pc
--      outtromovie = "tutorial01gcw",
--      outtromovie_left = 90,
--      outtromovie_top = 60,
--      outtromovie_width = 460,
--      outtromovie_height = 350,
--      outtromovielocalized = 1,
      voiceover = "imp_missionbriefing_tat1",
      briefingmusic = "shell_imperialmarch",
      iconmodel = "com_icon_imperial"
   },--Player is the Empire
   {
      mapluafile = "tat2i_h",
      side = 1,      
      showstr = "ifs.sp.gcw.map2name",
      description = "ifs.sp.gcw.map2descr",
      movie = "tat2fly",
      intromovie = "tat2h01",
      voiceover = "imp_missionbriefing_tat2",
      briefingmusic = "shell_imperialmarch",
      --unlockable = 6,
      iconmodel = "com_icon_imperial"
   },--Player is the Empire
   {
      mapluafile = "rhn2a_h",
      side = 2,
      showstr = "ifs.sp.gcw.map3name",
      description = "ifs.sp.gcw.map3descr",
      movie = "rhn2fly",
      voiceover = "imp_missionbriefing_rhn1",
      briefingmusic = "shell_imperialmarch",
      iconmodel = "com_icon_imperial"
   },--Player is the Empire
   {
      mapluafile = "yav2i_h",
      side = 1,      
      showstr = "ifs.sp.gcw.map4name",
      description = "ifs.sp.gcw.map4descr",
      movie = "yav2fly",
      intromovie = "yav2h01",
      voiceover = "imp_missionbriefing_yav1",
      briefingmusic = "shell_imperialmarch",
      iconmodel = "com_icon_imperial"
   },--Player is the Alliance
   {
      mapluafile = "yav1i_h",
      side = 2,      
      showstr = "ifs.sp.gcw.map5name",
      description = "ifs.sp.gcw.map5descr",
      movie = "yav1fly",
      intromovie = "yav1h01",
      voiceover = "all_missionbriefing_yav1",
      briefingmusic = "shell_clash",
      --unlockable = 7,
      iconmodel = "com_icon_alliance"      
   },--Player is the Alliance

   --Player is the Alliance
   {
      mapluafile = "hot1i_h",
      side = 2,      
      showstr = "ifs.sp.gcw.map6name",
      description = "ifs.sp.gcw.map6descr", side = 2,
      movie = "hot1fly",
      outtromovie = "hot1h02",
      voiceover = "all_missionbriefing_hot1",
      briefingmusic = "shell_clash",
      --unlockable = 8,
      iconmodel = "com_icon_alliance"      
   },--Player is the Alliance
   {
      mapluafile = "bes2a_h",
      side = 1,
      showstr = "ifs.sp.gcw.map7name",
      description = "ifs.sp.gcw.map7descr",
      movie = "bes2fly",
      intromovie = "bes2h01",
      voiceover = "all_missionbriefing_bes1",
      briefingmusic = "shell_clash",
      --unlockable = 9,
      iconmodel = "com_icon_alliance"      
   },--Player is the Alliance
   {
      mapluafile = "bes1a_h",
      side = 1,
      showstr = "ifs.sp.gcw.map8name",
      description = "ifs.sp.gcw.map8descr",
      movie = "bes1fly",
      outtromovie = "bes1h01",
      voiceover = "all_missionbriefing_bes2",
      briefingmusic = "shell_clash",
      --unlockable = 10,
      iconmodel = "com_icon_alliance"      
   },--Player is the Alliance
   {
      mapluafile = "end1a_h",
      side = 1,      
      showstr = "ifs.sp.gcw.map9name",
      description = "ifs.sp.gcw.map9descr",
      movie = "end1fly",
      outtromovie = "end1h02",
      exitmovie = "end1h03",
      voiceover = "all_missionbriefing_end1",
      briefingmusic = "shell_clash",
      iconmodel = "com_icon_alliance"      
   },--Player is the Alliance
}


-- Tables for cached mapname lookups. The key for each entry will
-- be the 'abbrev' passed into missionlist_GetLocalizedMapName(abbrev)
-- if present.
gMapName0Table = {}
gMapName1Table = {}
gMapName2Table = {}

-- API
-- ShowUStr, iSource = missionlist_GetLocalizedName("tat3a")
--
-- Given an abbreviation (e.g. "tat3a"), returns a localized unicode
-- string that should be shown. Also returns an index of where that
-- string came from:
-- 0: localize database
-- 1: addon map w/ English-only string
-- 2: fallback (abbrev upconverted to Unicode)
function missionlist_GetLocalizedMapName(abbrev)
   -- Look in cached lookups first
   local CacheUStr

   CacheUStr = gMapName0Table[abbrev]
   if(CacheUStr) then
      --      print("gMapName0Table["..abbrev.."] found")
      return CacheUStr, 0
   end

   CacheUStr = gMapName1Table[abbrev]
   if(CacheUStr) then
      --      print("gMapName1Table["..abbrev.."] found")
      return CacheUStr, 1
   end

   CacheUStr = gMapName2Table[abbrev]
   if(CacheUStr) then
      --      print("gMapName2Table["..abbrev.."] found")
      return CacheUStr, 2
   end

   ------- Not cached. Do lookup, stick it in cache

   local i,j,l
   l = strlen(abbrev)

   -- Pass #1, try and find it in current missionlist
   if(missionselect_listbox_contents) then
      for i = 0,1 do
         local TrimmedStr = strupper(strsub(abbrev, 1, l - i))
         for j = 1,getn(missionselect_listbox_contents) do
            if(TrimmedStr == strupper(missionselect_listbox_contents[j].mapluafile)) then
               local DisplayUStr = ScriptCB_getlocalizestr(missionselect_listbox_contents[j].showstr, 1) -- 2nd param: return nil if not found
               if(DisplayUStr) then
                  gMapName0Table[abbrev] = DisplayUStr
                  return DisplayUStr, 0
               else
                  DisplayUStr = ScriptCB_tounicode(missionselect_listbox_contents[j].showstr)
                  gMapName1Table[abbrev] = DisplayUStr
                  return DisplayUStr, 1
               end
            end
         end -- j loop over missionselect_listbox_contents
      end -- i loop over trimming suffixes
   end

   -- Final fallback: show what was received
   local DisplayUStr = ScriptCB_tounicode(abbrev)
   gMapName2Table[abbrev] = DisplayUStr
   return DisplayUStr, 2
end
[/spoiler]
[spoiler=mission.req]ucft
{
    REQN
    {
        "lvl"
        "bes1a"
        "bes1a_h"
   "bes1r"
        "bes1lcw"
   "bes2a"
   "bes2a_h"
   "bes2r"
        "bes2lcw"
   "end1a"
   "end1a_h"
        "end1lcw"
   "GEO1r"
   "GEO1r_h"
        "GEO1lcw"
   "hot1i"
   "hot1i_h"
        "hot1lcw"
   "kam1c"
   "kam1c_h"
        "kam1lcw"
   "kas1c"
   "kas1c_h"
   "kas1i"
        "kas1lcw"
   "kas2c"
   "kas2c_h"
   "kas2i"
        "kas2lcw"
   "NAB1c"
   "NAB1c_h"
   "NAB1i"
        "NAB1lcw"
   "nab2a"
   "nab2c"
   "nab2c_h"
        "nab2lcw"
   "rhn1r_h"
   "rhn1i"
   "rhn1r"
        "rhn1lcw"   
   "rhn2a"
   "rhn2a_h"
   "rhn2c"
        "rhn2lcw"
   "tat1i"
   "tat1i_h"
   "tat1r"
        "tat1lcw"
   "tat2i"
   "tat2i_h"
   "tat2r"
        "tat2lcw"
   "yav1c"   
   "yav1i"
   "yav1i_h"
        "yav1lcw"
   "yav2i"
   "yav2i_h"
   "yav2r"
        "yav2lcw"
   "nab2h"
    }
}

[/spoiler]
There insn't anything wrong with the individual mission .reqs and .luas.
Note: "Late Clone Wars" is a test era and will likely never be released.
Title: Re: Help with eras
Post by: Dark_Phantom on October 22, 2013, 09:58:40 PM
Hmm, that's odd.  Is everything munging correctly?  That should at the very least get you a button to show up.
If you could send me the files, I could look at them and see what I can do.  I need to brush up on it anyway.  Mandalorian Wars is sitting on my computer just dying to get released in beta... those "brush-ups" just haven't happened yet.
Title: Re: Help with eras
Post by: Rayce on October 23, 2013, 06:21:02 PM
Hmm... it won't let me post .lua or .req files. And I cannot sent pms with attachments.
Title: Re: Help with eras
Post by: Led on October 23, 2013, 06:29:46 PM
Quote from: CommanderAwesome on October 23, 2013, 06:21:02 PM
Hmm... it won't let me post .lua or .req files. And I cannot sent pms with attachments.

copy and paste into a code tag or spoiler tag
or
upload as zip attachement
Title: Re: Help with eras
Post by: Rayce on October 24, 2013, 09:24:01 AM
Here you go.
Note: "Late Clone Wars" is a test era and probably won't be released. "ep3.lvl" is the Republic from Napseeker's Battle of Coruscant map.
Title: Re: Help with eras
Post by: Rayce on October 25, 2013, 10:14:52 AM
Ok, the button is showing up but it crashes on startup.
Title: Re: Help with eras
Post by: Dark_Phantom on October 25, 2013, 10:52:35 AM
In ifs_sp_era, check to see if it is "L",  if I remember right all your levels are just labeled "L", but Late Clone Wars is labeled LCW.  Check and see if what comes up on the Instant Action queue is the same as your lua names.

My fault for not proofreading enough I guess.
Title: Re: Help with eras
Post by: Rayce on October 26, 2013, 10:40:31 AM
Quote from: Dark_Phantom on October 25, 2013, 10:52:35 AM
In ifs_sp_era, check to see if it is "L",  if I remember right all your levels are just labeled "L", but Late Clone Wars is labeled LCW.  Check and see if what comes up on the Instant Action queue is the same as your lua names.

My fault for not proofreading enough I guess.
The names of my mission .luas all end with "lcw", I wasn't sure weather I should put just 1 letter or my era code.
Title: Re: Help with eras
Post by: Dark_Phantom on October 27, 2013, 11:08:43 AM
Your entire era code must go in there for now so it can load correctly.
Title: Re: Help with eras
Post by: Rayce on October 27, 2013, 11:42:07 AM
lcw is my era code...
Title: Re: Help with eras
Post by: Phobos on October 27, 2013, 12:25:56 PM
Quote from: CommanderAwesome on September 29, 2013, 06:28:10 PM
Thanks for the help. BTW, how many new eras can you have at once?
I think you can have up to 22 new eras (every letter in the alphabet except A C I R).

I looked through era files.zip briefly and I think it would be a good idea to rename all your mission LUAs from "lcw" to "l".

For example change bes1lcw.lua to bes1l.lua
bes2lcw to bes2l.lua
etc.

The mission REQs you built call on those names too.
Code (bes1l.req) Select
ucft
{
    REQN
    {
        "script"
        "bes1l"
    }
}



If your mission REQ calls on bes1l.lua then that is the file that must be present for it to munge the mission properly. Your game is crashing because the mission LUAs aren't being loaded. Rename the mission LUA scripts and you should get a bigger mission LVL when you munge now.

The other problem I see is in your mission.req. It's not loading the subreq files properly so it's not even munging those.

Note the mission REQ specifies sub-REQ files, so the way you have it now, its calling on bes1lcw.REQ, it needs to call on bes1l.REQ.
The sub REQs call on the LUAs, not the mission.REQ.

So change your mission.REQ to this (should patch all the subreqs).
ucft
{
    REQN
    {
        "lvl"
        "bes1a"
        "bes1a_h"
"bes1r"
        "bes1l"
"bes2a"
"bes2a_h"
"bes2r"
        "bes2l"
"end1a"
"end1a_h"
        "end1l"
"GEO1r"
"GEO1r_h"
        "GEO1l"
"hot1i"
"hot1i_h"
        "hot1l"
"kam1c"
"kam1c_h"
        "kam1l"
"kas1c"
"kas1c_h"
"kas1i"
        "kas1l"
"kas2c"
"kas2c_h"
"kas2i"
        "kas2l"
"NAB1c"
"NAB1c_h"
"NAB1i"
        "NAB1l"
"nab2a"
"nab2c"
"nab2c_h"
        "nab2l"
"rhn1r_h"
"rhn1i"
"rhn1r"
        "rhn1l"
"rhn2a"
"rhn2a_h"
"rhn2c"
        "rhn2l"
"tat1i"
"tat1i_h"
"tat1r"
        "tat1l"
"tat2i"
"tat2i_h"
"tat2r"
        "tat2l"
"yav1c"
"yav1i"
"yav1i_h"
        "yav1l"
"yav2i"
"yav2i_h"
"yav2r"
        "yav2l"
"nab2h"
    }
}



I haven't looked through the shell scripts yet but once you patch these things your mission.LVL should be all set.
Title: Re: Help with eras
Post by: Rayce on October 29, 2013, 10:17:03 AM
Quote from: Phobos on October 27, 2013, 12:25:56 PM
I think you can have up to 22 new eras (every letter in the alphabet except A C I R).

I looked through era files.zip briefly and I think it would be a good idea to rename all your mission LUAs from "lcw" to "l".

For example change bes1lcw.lua to bes1l.lua
bes2lcw to bes2l.lua
etc.

The mission REQs you built call on those names too.
Code (bes1l.req) Select
ucft
{
    REQN
    {
        "script"
        "bes1l"
    }
}



If your mission REQ calls on bes1l.lua then that is the file that must be present for it to munge the mission properly. Your game is crashing because the mission LUAs aren't being loaded. Rename the mission LUA scripts and you should get a bigger mission LVL when you munge now.

The other problem I see is in your mission.req. It's not loading the subreq files properly so it's not even munging those.

Note the mission REQ specifies sub-REQ files, so the way you have it now, its calling on bes1lcw.REQ, it needs to call on bes1l.REQ.
The sub REQs call on the LUAs, not the mission.REQ.

So change your mission.REQ to this (should patch all the subreqs).
ucft
{
    REQN
    {
        "lvl"
        "bes1a"
        "bes1a_h"
"bes1r"
        "bes1l"
"bes2a"
"bes2a_h"
"bes2r"
        "bes2l"
"end1a"
"end1a_h"
        "end1l"
"GEO1r"
"GEO1r_h"
        "GEO1l"
"hot1i"
"hot1i_h"
        "hot1l"
"kam1c"
"kam1c_h"
        "kam1l"
"kas1c"
"kas1c_h"
"kas1i"
        "kas1l"
"kas2c"
"kas2c_h"
"kas2i"
        "kas2l"
"NAB1c"
"NAB1c_h"
"NAB1i"
        "NAB1l"
"nab2a"
"nab2c"
"nab2c_h"
        "nab2l"
"rhn1r_h"
"rhn1i"
"rhn1r"
        "rhn1l"
"rhn2a"
"rhn2a_h"
"rhn2c"
        "rhn2l"
"tat1i"
"tat1i_h"
"tat1r"
        "tat1l"
"tat2i"
"tat2i_h"
"tat2r"
        "tat2l"
"yav1c"
"yav1i"
"yav1i_h"
        "yav1l"
"yav2i"
"yav2i_h"
"yav2r"
        "yav2l"
"nab2h"
    }
}



I haven't looked through the shell scripts yet but once you patch these things your mission.LVL should be all set.
It's still crashing,  I don't know what's wrong. The missions still show up as "[map abbreviation]lcw" in the instant action menu and the button won't show up for endor, geonosis, hoth or kamino. 
Title: Re: Help with eras
Post by: Phobos on October 29, 2013, 11:26:30 AM
Quote from: CommanderAwesome on October 29, 2013, 10:17:03 AM
It's still crashing,  I don't know what's wrong. The missions still show up as "[map abbreviation]lcw" in the instant action menu and the button won't show up for endor, geonosis, hoth or kamino.
That does sound like a shell LUA bug possibly missionlist. To enable the era buttons for those 4 maps you need to add the reference for their era letter to missionlist and also a dummy reference to opposite era.

Does SPtest show any error logs?
Title: Re: Help with eras
Post by: Dark_Phantom on October 29, 2013, 02:49:03 PM
I will try to recreate this later tonight.  I still think there is something wrong with the mission.lvl.
Ok, the bug with one era levels was a missionlist fix I thought I did through that missionlist.lua.
The other bug I think still has something to do with level naming.  Pick one.  You reference that it says [map abbrev]lcw.  Therefore, your lua must be named [map abbrev]lcw, not [map abbrev]l like I saw you had in your files.
Example:
Game says RHN2lcw, must find lua named RHN2lcw.  All the subreqs and req files must say RHN2lcw, not RHN2l.
Title: Re: Help with eras
Post by: Rayce on October 30, 2013, 10:15:44 AM
Quote from: Phobos on October 29, 2013, 11:26:30 AM
That does sound like a shell LUA bug possibly missionlist. To enable the era buttons for those 4 maps you need to add the reference for their era letter to missionlist and also a dummy reference to opposite era.

Does SPtest show any error logs?
I haven't done SPtest yet, only been testing with game.
Quote from: Dark_Phantom on October 29, 2013, 02:49:03 PM
I will try to recreate this later tonight.  I still think there is something wrong with the mission.lvl.
Ok, the bug with one era levels was a missionlist fix I thought I did through that missionlist.lua.
The other bug I think still has something to do with level naming.  Pick one.  You reference that it says [map abbrev]lcw.  Therefore, your lua must be named [map abbrev]lcw, not [map abbrev]l like I saw you had in your files.
Example:
Game says RHN2lcw, must find lua named RHN2lcw.  All the subreqs and req files must say RHN2lcw, not RHN2l.
Nothing's calling for [map abbrev]lcw in any of the .reqs of .luas.
Title: Re: Help with eras
Post by: Rayce on November 09, 2013, 09:42:50 AM
I still need help with this.
Title: Re: Help with eras
Post by: Phobos on November 09, 2013, 01:18:23 PM
zip up your current mission builder with the LUA and include another folder with your shell scripts i will look over them and see what can be done there could be several errors or just an obscure bug causing the crash
Title: Re: Help with eras
Post by: Rayce on January 04, 2014, 05:43:50 PM
Sorry i'm  late on this, this should be everything.
EhPortal 1.34 © 2024, WebDev