[ create a new paste ] login | about

Link: http://codepad.org/uJXmja7n    [ raw code | fork ]

diogenese - Plain Text, pasted on Jan 7:
PROBLEM: What static objects and spawners are being create in a map for a given game play mode?

BACKGROUND: The game engine runs 3 files from a map while loading the game:

  Menu/Init.con - run before map is chosen to set basic info
  Init.con      - run before the game objects are loaded

and lastly, any one of these:

  SinglePlayerAllied.con         - run by client
  SinglePlayerAxis.con           - run by client
  <game play type>.con           - (Guessing) run by client
  GameTypes/<game play type>.con - (Guessing) run by server

Any of these files can call other scripts using the 'run' statement, which tends to follow 
a standard, but can't be trusted. 

SOLUTION: Hand enter the game play modes since, there aren't really that many of them and 
they vary slightly from game engine to game engine, and maybe from mod to mod.

List all the run statements called from that map:

mysql> call active_map_files(162);
Query OK, 0 rows affected (0.59 sec)

mysql> SELECT md.mod, lo.filename,concat(if(length(f.path),concat(f.path,"/"),""),f.filename) as arch_path,l.lineid,item,f.type 
 FROM bflineitems li  join bflines l on l.fileid=li.fileid and l.lineid=li.lineid join activefiles f on f.id=l.fileid
 join bflocations lo on lo.id=f.locid join bfmods md on md.id=lo.modid
 WHERE FIND_IN_SET("RUN",l.flags) and lo.base="dc_basrahs_edge";
+------------+-------------------------+------------------------+--------+--------------------------------------------+------+
| mod        | filename                | arch_path              | lineid | item                                       | type |
+------------+-------------------------+------------------------+--------+--------------------------------------------+------+
| DC_Realism | DC_Basrahs_Edge.rfa     | Init.con               |     55 | run Init/SkyAndSun                         | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | Init.con               |     56 | run Init/Terrain                           | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | Init.con               |     57 | run Objects/objects                        | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Conquest.con |      6 | run Conquest/SpawnpointManagerSettings     | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Conquest.con |      7 | run Conquest/SoldierSpawnTemplates         | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Conquest.con |      8 | run Conquest/SoldierSpawns                 | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Conquest.con |      9 | run Conquest/ObjectSpawnTemplates          | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Conquest.con |     10 | run Conquest/ControlPointTemplates         | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Conquest.con |     14 | run Conquest/ObjectSpawns                  | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Conquest.con |     15 | run Conquest/ControlPoints                 | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |      6 | run SinglePlayer/SoldierSpawnTemplates     | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |      7 | run SinglePlayer/SoldierSpawns             | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |      8 | run SinglePlayer/SpawnpointManagerSettings | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |      9 | run SinglePlayer/ObjectSpawnTemplates      | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |     10 | run SinglePlayer/ControlPointTemplates     | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |     14 | run ai                                     | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |     15 | run SinglePlayer/ObjectSpawns              | CON  |
| DC_Realism | DC_Basrahs_Edge.rfa     | GameTypes/Coop.con     |     16 | run SinglePlayer/ControlPoints             | CON  |
| DC_Realism | DC_Basrahs_edge_790.rfa | ai.con                 |     23 | run AIPathFinding.con                      | CON  |
| DC_Realism | DC_Basrahs_edge_790.rfa | ai.con                 |     24 | run ai/StrategicAreas                      | CON  |
| DC_Realism | DC_Basrahs_edge_790.rfa | ai.con                 |     25 | run ai/conditions.con                      | CON  |
| DC_Realism | DC_Basrahs_edge_790.rfa | ai.con                 |     26 | run ai/prerequisites.con                   | CON  |
| DC_Realism | DC_Basrahs_edge_790.rfa | ai.con                 |     27 | run ai/Strategies.con                      | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |      2 | run singleplayer/Tweaks                    | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |      3 | run singleplayer/ControlPointTemplates     | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |      4 | run singleplayer/SpawnpointManagerSettings | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |      5 | run singleplayer/SoldierSpawnTemplates     | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |      6 | run singleplayer/SoldierSpawns             | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |      7 | run singleplayer/ObjectSpawnTemplates      | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |     21 | run ai                                     | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |     23 | run SinglePlayer/ObjectSpawns              | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |     24 | run singleplayer/ControlPoints             | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAllied.con |     28 | run bind                                   | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |      2 | run singleplayer/Tweaks                    | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |      3 | run singleplayer/ControlPointTemplates     | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |      4 | run singleplayer/SpawnpointManagerSettings | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |      5 | run singleplayer/SoldierSpawnTemplates     | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |      6 | run singleplayer/SoldierSpawns             | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |      7 | run singleplayer/ObjectSpawnTemplates      | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |     21 | run ai                                     | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |     23 | run SinglePlayer/ObjectSpawns              | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |     24 | run singleplayer/ControlPoints             | CON  |
| DC_Realism | DC_Basrahs_edge_799.rfa | SinglePlayerAxis.con   |     28 | run bind                                   | CON  |
+------------+-------------------------+------------------------+--------+--------------------------------------------+------+
43 rows in set (0.06 sec)


Then parse the 'item' field, chain the runs together and limit the files in 
the 'activefiles' table from the map to those run for that game mode. Easier 
said than done.




Create a new paste based on this one


Comments: