- Posts
- 32
- Likes
- 91
Edit: updated at last.
Map porting:
Some may have noticed the threads I've made for ports. Here I hope to explain the method I use and possibly encourage others to do so. Any Jedi Academy or Jedi Outcast map may be ported to MB2 relatively easily, using entity modding. Steps for entity modding in general will follow at the bottom of this post. If you already know how, these are the requirements to porting a map:
General TFFA style: the bare minimum a map needs to work in MB2, aside from a correct .siege file (which is beyond the scope of this guide), are player spawns. You should have at least 16 info_player_siegeteam1 and 16 info_player_siegeteam2 entities in your map, appropriately placed. Some maps have 32 of each; technically, this is ideal, not because there are 64 player servers, but because there may be uneven teams.
Don't forget to add an info_player_intermission. Also, I've found some maps refuse to load with siegeteam spawns. Adding info_player_deathmatch spawns has solved the problem before, though I'm not sure why. Regardless, these are supported by MB2, but will not differentiate between teams.
Objectives: adding an objective will allow for a team to end the round by triggering a certain condition. Essentially, you add an info_siege_objective entity as the argument in a "target" parameter. Here are a few strategies: you can take advantage of existing triggers on a map and using them to trigger an objective. Note: you cannot add triggers through a simple entity mod, as they are both entities and brushes, and brushes cannot be manipulating with this technique (in theory, it is possible to edit brushes without decompiling by using a merge .bsp tool, but I haven't figured this out yet).
You can also use existing func_breakable things to trigger objectives - this is how I made the trench run map's reactor port trigger the objective; the mapper had already left in a mechanic to give points to people who shot the reactor port, so it was possible for me to adjust it to trigger the objective instead.
Another option is to use NPCs. If an NPC dies, it can trigger another entity. An example of this is re_mansion, where killing the infected at the end triggers the objective. Another example is the rancor on mb2_jabba, which triggers a script that unlocks the rancor pit's exit gate. The advantage of NPCs is that they can be added freely with an entity mod, although they may not fit the usual MB2 format of hacking terminals.
Some issues to consider: sometimes changing a trigger to require a long hack (adding a "usetime" parameter) doesn't work. In this case, an instant hack usually works, though it is jarring to have one of those trigger an objective.
Progressive siege: it is possible to convert a JKA style siege map into MB2's progressive siege format. I haven't done this yet, so I'll update this thread later when I know how to.
Entity modding guide - this is how you go about adding the aforementioned entities. My workflow:
Map porting:
Some may have noticed the threads I've made for ports. Here I hope to explain the method I use and possibly encourage others to do so. Any Jedi Academy or Jedi Outcast map may be ported to MB2 relatively easily, using entity modding. Steps for entity modding in general will follow at the bottom of this post. If you already know how, these are the requirements to porting a map:
General TFFA style: the bare minimum a map needs to work in MB2, aside from a correct .siege file (which is beyond the scope of this guide), are player spawns. You should have at least 16 info_player_siegeteam1 and 16 info_player_siegeteam2 entities in your map, appropriately placed. Some maps have 32 of each; technically, this is ideal, not because there are 64 player servers, but because there may be uneven teams.
Don't forget to add an info_player_intermission. Also, I've found some maps refuse to load with siegeteam spawns. Adding info_player_deathmatch spawns has solved the problem before, though I'm not sure why. Regardless, these are supported by MB2, but will not differentiate between teams.
Objectives: adding an objective will allow for a team to end the round by triggering a certain condition. Essentially, you add an info_siege_objective entity as the argument in a "target" parameter. Here are a few strategies: you can take advantage of existing triggers on a map and using them to trigger an objective. Note: you cannot add triggers through a simple entity mod, as they are both entities and brushes, and brushes cannot be manipulating with this technique (in theory, it is possible to edit brushes without decompiling by using a merge .bsp tool, but I haven't figured this out yet).
You can also use existing func_breakable things to trigger objectives - this is how I made the trench run map's reactor port trigger the objective; the mapper had already left in a mechanic to give points to people who shot the reactor port, so it was possible for me to adjust it to trigger the objective instead.
Another option is to use NPCs. If an NPC dies, it can trigger another entity. An example of this is re_mansion, where killing the infected at the end triggers the objective. Another example is the rancor on mb2_jabba, which triggers a script that unlocks the rancor pit's exit gate. The advantage of NPCs is that they can be added freely with an entity mod, although they may not fit the usual MB2 format of hacking terminals.
Some issues to consider: sometimes changing a trigger to require a long hack (adding a "usetime" parameter) doesn't work. In this case, an instant hack usually works, though it is jarring to have one of those trigger an objective.
Progressive siege: it is possible to convert a JKA style siege map into MB2's progressive siege format. I haven't done this yet, so I'll update this thread later when I know how to.
Entity modding guide - this is how you go about adding the aforementioned entities. My workflow:
- Open the map's .bsp file in a text editor. Personally, I use notepad++;
- To jump to the entity section, search (ctrl + f) for worldspawn. This is always at the start of the entity section, so it is an easy way to find it (otherwise, you might be scrolling for a while);
- Copy all entity data to an empty text file. The entity data will start with an "{" and end with another "}", with potentially over several hundred lines in between. The end one is easy to find, but the starting one can be annoying - sometimes, it isn't in line with the real start of the entities. It will be a bit above the worldspawn and at the end of the last line of the general bsp gibberish, so you will have to scroll all the way to the right to find it;
- Rename this file to the same as the map's bsp except with extension ".ent". So, if you wanted to entity mod mb2_jabba.bsp, you would want it to be mb2_jabba.ent;
- To actually entity swap things around, edit the ent file in your text editor. You can change existing entities or add new ones, though for fewer errors I recommend trying to keep new additions or reductions to a minimum. Also, they should, ideally, be placed near to other entities with similar coordinates. For example, if you want to disable an entity, it's better to change its classname to info_null (this will make it do nothing regardless of parameters) instead of deleting it outright;
- To insert the new entities into the .bsp file: place the .bsp to be altered and the .ent file in your netradiant directory. You should insert into it a .bat file (name it "ent-to-bsp.bat") with the following contents:
q3map2.exe -game ja -onlyents mb2_jabba.ent
- Run this file. It will overwrite the .bsp you placed with the edited one. You can test it now, either by packaging it into a .pk3 file under maps/ or by creating a folder in the MBII folder called "maps" and placing it in there. Note: if another .bsp of the same name exists in a .pk3 in the MBII folder, it will overwrite this one, so this wouldn't be suitable for modding existing maps
Sometimes there may be errors, e.g. lights broken, portals/doors all white. This can be fixed by changing the order of the entities around. For example, writing the new entities around other entities with close origins
Last edited: