login

Author Topic: 3rd era for maps  (Read 1576 times)

Radical_Pi

  • Mustard of Doom
  • Advanced Member
  • *****
  • Posts: 843
  • Your request is delayed
    • View Profile
    • http://www.mpcgamers.com
    • Awards
  • GR ID: 317294
  • Steam ID:
3rd era for maps
« on: March 08, 2009, 02:30:37 PM »
Many of the people from the old MXG will remember that someone stumbled across a mechanism for creating a 3rd era for the maps. We never were able to figure out how to use it then, but guess what just changed :D

For those of you who don't remember, someone (I'm willing to give credit to whoever stumbled across this) accidentally clicked four times on a map without choosing an era, and in the selected maps area a new map appeared which was something like Maz1_add. (this depended on which map it was using). All our attempts to get it to actually load a new map failed, and the record of this was lost in one of the crashes of the old site MXG.

Here's what I did to get it to work:

(please note that you need to replace tst3 in my instructions with the short name you gave your map when creating it

1: Create a new map that does both CW and GCW
2: Go to the map folder (all my instructions will be relative to the root of the source for the map ex. BFBuilder\Datatst3)
3: Go to Common\Mission and create a new file called tst3_add.req and put the following in the file:
Code: [Select]
ucft
{
    REQN
    {
        "script"
        "tst3_add"
    }
}
4: Go to Common\Scripts\tst3 and create a new file called tst3_add.lua. This is just like any other mission LUA, so I just copied the contents of one of the other LUA files in the folder.
5: Go to Common and open mission.req. Insert the following line after "tst3c":
Code: [Select]
"tst3_add"It should now look something like this:
Code: [Select]
ucft
{
    REQN
    {
        "lvl"
        "tst3a"
        "tst3c"
"tst3_add"
    }
}
6: Go to addme and open addme.lua. Add the following line at the end of the AddDownloadableContent lines:
Code: [Select]
AddDownloadableContent("tst3","tst3_add",4)The file should now look something like this:
Code: [Select]
-- add the new tat level to the missionlist
local newEntry = { mapluafile = "tst3", showstr = "3rd Era Test", side_c = 1, side_a = 1, dnldable = 1, }

-- append it to the sp missionlist table
local n = getn(sp_missionselect_listbox_contents)  
sp_missionselect_listbox_contents[n+1] = newEntry

-- append it to the mp missionlist table
n = getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[n+1] = newEntry


-- associate this mission name with the current downloadable content directory
-- you should list all missions in mission.lvl here.
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier.  the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)
AddDownloadableContent("tst3","tst3c",4)
AddDownloadableContent("tst3","tst3a",4)
AddDownloadableContent("tst3","tst3_add",4)

-- all done
newEntry = nil
n = nil
7: Munge it and take it for a test run

Source and map here: http://files.filefront.com/3rd+erarar/; ... einfo.html

If you only want the map and not the source, it's here: http://files.filefront.com/tst3rar/;134 ... einfo.html

I just checked, and it does work for MP games yay!

I can't figure out any way to get it to display an option on map selection. I think that will need a shell edit
« Last Edit: March 08, 2009, 03:01:12 PM by The_Pi »

Viruses are like the New York Lottery. "Hey, you never know"

MileHighGuy

  • SWBF1 Modder
  • Master Modder
  • Frequent Poster
  • ***
  • Posts: 296
    • View Profile
    • Awards
  • Steam ID:
Re: 3rd era for maps
« Reply #1 on: March 08, 2009, 02:54:27 PM »
wow, this, is monumental!

now ggctuk can make his mod not kill online, and everyone else too!!

 :-P

is it possible to make any more eras?

and maybe somehow people could add a 6th unit by doing things similar to this

Radical_Pi

  • Mustard of Doom
  • Advanced Member
  • *****
  • Posts: 843
  • Your request is delayed
    • View Profile
    • http://www.mpcgamers.com
    • Awards
  • GR ID: 317294
  • Steam ID:
Re: 3rd era for maps
« Reply #2 on: March 08, 2009, 02:59:40 PM »
Uploaded the source and the actual map. Links in main post

As for your question: I know of no way to do a 4th era. This was a special case in the game

Napseeker has made some maps with 7 units, however they cannot be played online.

Viruses are like the New York Lottery. "Hey, you never know"

MileHighGuy

  • SWBF1 Modder
  • Master Modder
  • Frequent Poster
  • ***
  • Posts: 296
    • View Profile
    • Awards
  • Steam ID:
Re: 3rd era for maps
« Reply #3 on: March 08, 2009, 03:03:56 PM »
did he write up a tutorial anywhere?

Radical_Pi

  • Mustard of Doom
  • Advanced Member
  • *****
  • Posts: 843
  • Your request is delayed
    • View Profile
    • http://www.mpcgamers.com
    • Awards
  • GR ID: 317294
  • Steam ID:
Re: 3rd era for maps
« Reply #4 on: March 08, 2009, 03:05:13 PM »
Not that I know of. He's not very active any more but you could try to find him some time

Viruses are like the New York Lottery. "Hey, you never know"

Napseeker

  • Frequent Poster
  • ****
  • Posts: 108
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: 3rd era for maps
« Reply #5 on: March 11, 2009, 02:16:44 PM »
@Pi: this is a really cool discovery, congratulations on such a big find!  Perhaps battlebelk will eventually find a way to allow this 3rd era to be shown as an option, but if nothing else, it seems like a cool easter egg type way to include a secret map.

@MHGuy: I still try to come round here every few days if I can and just check my mail and if anyone is having any issues with my maps/mods.  Feel free to pm me if you have any modding questions and I will try to answer as best as I can.  I don't think my approach for the 7-unit sides can ever be fixed for MP, I would imagine that the way that psychofred did it (which I believe involved a shell edit/recompile) is the only way to go here.

Gistech

  • Imperial Shock Trooper
  • This Man Has No Life
  • *****
  • Posts: 1683
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: 3rd era for maps
« Reply #6 on: March 13, 2009, 05:09:08 AM »
And yet Psych0Fred never told us how he did it...
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

Napseeker

  • Frequent Poster
  • ****
  • Posts: 108
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: 3rd era for maps
« Reply #7 on: March 13, 2009, 12:50:11 PM »
I did pm him once to ask how he did it and if he'd release the files for others to reproduce the same result, but he said he'd forgotten how he did it and didn't have the project anymore. ::shrug::

Radical_Pi

  • Mustard of Doom
  • Advanced Member
  • *****
  • Posts: 843
  • Your request is delayed
    • View Profile
    • http://www.mpcgamers.com
    • Awards
  • GR ID: 317294
  • Steam ID:
Re: 3rd era for maps
« Reply #8 on: March 13, 2009, 02:01:38 PM »
Do you know where the map is that he did that on is? I might be able to decompile the shell he made since LUA can be decompiled with no data loss and LVL is just all the files appended to eachother

Also, there's no EULA to get me sued if I do it

Viruses are like the New York Lottery. "Hey, you never know"

Gistech

  • Imperial Shock Trooper
  • This Man Has No Life
  • *****
  • Posts: 1683
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
  • PSN: ggctuk
  • Steam ID:
Re: 3rd era for maps
« Reply #9 on: March 13, 2009, 04:41:28 PM »
LVLs and LUAs can be decompiled? The only tool I knew that could do that was the LVL extractor, but that was never finished...
Works in Progress:
--Star Wars: Battlefront Legacy (Phase 1 released - Phase 2 in development, base game due 2017)

Napseeker

  • Frequent Poster
  • ****
  • Posts: 108
  • Awards Releasing Multiple Mods on SWBFgamers.com
    • View Profile
    • Awards
Re: 3rd era for maps
« Reply #10 on: March 13, 2009, 04:48:21 PM »
Quote from: "The_Pi"
Do you know where the map is that he did that on is? I might be able to decompile the shell he made since LUA can be decompiled with no data loss and LVL is just all the files appended to eachother

Unfortunately all he ever posted was that screenshot and never the actual map that he edited. Since he said he no longer had the project, I assumed he meant the munged map as well.  I could be wrong... Teancum over at GT mentioned that he still chats with fred so maybe he'd be willing to ask if he could dig up that map. My bet is that he'll just say it's been erased along with everything else...

Breakdown

  • SWBF1 Modder
  • This Man Has No Life
  • *****
  • Posts: 1110
    • View Profile
    • Awards
  • Steam ID:
Re: 3rd era for maps
« Reply #11 on: March 13, 2009, 04:51:38 PM »
I still don't get how I get the whole third erea showing up?? Do i click 4 times or what? XD (i'm using the test map btw)

Radical_Pi

  • Mustard of Doom
  • Advanced Member
  • *****
  • Posts: 843
  • Your request is delayed
    • View Profile
    • http://www.mpcgamers.com
    • Awards
  • GR ID: 317294
  • Steam ID:
Re: 3rd era for maps
« Reply #12 on: March 13, 2009, 10:27:18 PM »
when you select the map, just keep clicking on it and the 3rd era should show up.

Also,

Quote from: "ggctuk"
LVLs and LUAs can be decompiled? The only tool I knew that could do that was the LVL extractor, but that was never finished...

LVL is very simple to decompile. Nothing is encoded. A simple copy-paste would work, as long as you knew where in the file to look. LUA is a standard language used in many programs (including WoW), and the compiler comes with a decompiler as well(got to download the right version though). So yes, they can be decompiled.

Also, almost all of the formats can be decompiled. ODF wouldn't be too hard to crack since all the property names are held. REQ is the only one that can't be extracted easily, since it is an index of the files to be added to the LVL.

Viruses are like the New York Lottery. "Hey, you never know"