OpenWarfare
It is currently Sun May 19, 2013 1:53 am




Post new topic Reply to topic  [ 1 post ] 
 Adding "Hide And Seek" support for custom maps 
Author Message
OpenWarfare Team
User avatar

Joined: Thu May 08, 2008 4:15 pm
Posts: 6410
Location: Mt. Olive, NJ
Country: United States (us)
xfire: t3chn0r
 Adding "Hide And Seek" support for custom maps
Attention! I assume that you have installed the mod tools for the respective game and you have successfully synchronized the OpenWarfare source code to your PC.

I will describe the process of adding support for a custom map to be able to play "Hide And Seek". The process consists of adding the complete list of props to the game for the specific map and then filter the list until we end up with the final list. The entire process can take from 10 to 30 minutes depending on how many models the map uses. The more models the map uses the longer it might take to filter the list.

This process is easier to do running a local dedicated server. For this example I'm going to use the map "Spetznas Base" (mp_sbase).

1. Set up the map rotation for this map:
Code:
set sv_mapRotation "gametype hns map mp_sbase"

2. Enable the variable to control the unlimited load of models in "Hide And Seek"
Code:
set scr_hns_proploader "1"

3. Open the file propModels.txt located in the "mp" folder.

4. Open the file propsTable.csv located also in the "mp" folder and copy & paste all the contents from the file propsModels.txt.

5. Replace all the strings "mp_script" with the name of the map, in this case "mp_sbase". You should end up with a list like this:
Code:
mp_sbase_1,ad_sodamachine,PROPS_AD_SODAMACHINE
mp_sbase_2,aftermath_power_stationthing3,PROPS_AFTERMATH_POWER_STATIONTHING3
mp_sbase_3,aftermath_roadblock_02,PROPS_AFTERMATH_ROADBLOCK_02
mp_sbase_4,aftermath_roadsign,PROPS_AFTERMATH_ROADSIGN
mp_sbase_5,ap_airbus_seat_1,PROPS_AP_AIRBUS_SEAT_1
...


Now the following steps will need to be repeated until we go through the entire list and no more errors appear in the console_mp.log:
6. Save the file propsTable.csv and compile a new version of mod.ff.

7. Start a local dedicated server and wait for the scrolling messages to stop (most of the time the server will crash with the message "ERROR: Exceeded limit of 1000 'xmodel' assets.").

8. Shutdown the server and open the file console_mp.log and search for the string "Error: Could not load xmodel". This types of lines will indicate which models can't be used in the current map. So, for each line containing this error we need to go to the file propsTable.csv and remove the entire line for the specific model. Do not worry about the number sequencing right now.

9. Repeat from step 6 until there are no more errors "Error: Could not load xmodel" in the file console_mp.log.

10. Once there are no more errors in the console it means that the list of models that we have left is the complete list of props that this map supports. At this points if you have too many you can pick which ones you would like to use. For this you just need to re-number the ones left, the game will take the first 45 items from the list. For the test you can just replace the number with "x" or use a higher number.

11. Once the re-numbering is done, compile the mod.ff one last time, deactivate the variable scr_hns_proploader by setting it back to "0" again, and happy gaming!


There's really no point of every person doing each map so if you want to share your prop list for a custom map please send the list to me via PM and I will create a sticky containing the list of props for the map and the name of the person that submitted the list.

_________________
Image
"Anyone who has never made a mistake has never tried anything new." -- Albert Einstein
"Any fool can write code that a computer can understand... But only good programmers write code that humans can understand." -- Martin Fowler


Wed Dec 08, 2010 8:53 pm
Profile YIM WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.