Take On Mars

Take On Mars

MP Cooperative Start in other vehicles
INFIDEL 2017 年 1 月 2 日 上午 7:44
MP Cooperative Start in Addon Vehicles
Within the mod pack, I see that res_mannedcargotransport_full.cfg and res_mannedcargotransport_empty.cfg are both listed as valid vehilce options when the gamemode is searching for a landing module.

I cleared out my extracted game data and ran the extraction again following the addition of the mod. (I don't think this is the way it works, but I wanted to see if the inclusion of mods/addons affect the game data).

What I assume is happening is that the game engine identifies gamemode as Expedition One: Cooperative and looks for a spawn point. This process then needs a vehicle, with this mod the vehicle list is increased to include ground vehicles.

The vehicles are found by their config files and the list of vehicles displayed in the mod have the path to each config file.

What I think I found is that the config files for the Addon vehicles do not exist at the location the path dictates.

Is this one possibility for why the Addon resource cargo transport is not working as a MP spawning location?

I'm trying to come up with a way to direct the game to locate the proper config files, but since addons and mods are in .pak files; it seems not as easy as just editing the config paths.

Lastly, any help with basic coding terminology would be helpful so I can communicate more clearly.

Appreciate any insight!
最后由 INFIDEL 编辑于; 2017 年 2 月 23 日 上午 6:15
< >
正在显示第 1 - 12 条,共 12 条留言
dariusz1983  [开发者] 2017 年 1 月 2 日 上午 8:35 
Hey there. Short, yes, there seems to be a bug in the code regarding the addon cargo truck.

Long answer: When a new player is spawned, which happens in the eo_impl.h file (located in scripts/mpgamemodes/common):MPGM_EOMode::CreateCharacterForPlayer() method. Here, depending on a parameter it is decided if you spawn in the readyroom, the mission theatre or if you get restored. If you spawn in the mission the SpawnCharacterInLandingModule() method is called. This method is implemented in the different game modes.

This method attemts to "get" a suitable vehicle, by calling GetLandingModule(), which either looks for an already existing vehicle. If none is found one is created landing towards a spawn point.

The method I used (and Dram for the Vanilla version) is FindVehicleByCFG() which looks through all vehicle in the scene and returns the first it can find which has the given config file path.

This method is defined in scripts/campaign/gameobjectsimpl.h in the class Location. The Location class has an array with all vehicles in the scene. There are several methods to "find" vehicles.

Now to the rest of your questions...no mod/addon has any effect on the game data. It is located in archive files (*.pak). The launcher can extract them. Interestingly, as you know, TKOM is a total conversion of Carrier Command GM (with some extras). If you own that game, you can find a tool in it's binary folder with which you can extract the pak files yourself.

If you install a mod/addon the game basically first looks if there's something in your addonpacks folder, if yes, it uses that file, if not, it uses the default file in it's pak files. Same with this mod. I simply replicated the folder structure and placed my gamemode script file, that's it.

It is possible I should have used a different path for the addon vehicle, something like $addons:/scripts/entities.... I will have a look.

INFIDEL 2017 年 1 月 2 日 上午 10:27 
引用自 dariusz1983
Now to the rest of your questions...no mod/addon has any effect on the game data. It is located in archive files (*.pak). The launcher can extract them. Interestingly, as you know, TKOM is a total conversion of Carrier Command GM (with some extras). If you own that game, you can find a tool in it's binary folder with which you can extract the pak files yourself.

If you install a mod/addon the game basically first looks if there's something in your addonpacks folder, if yes, it uses that file, if not, it uses the default file in it's pak files. Same with this mod. I simply replicated the folder structure and placed my gamemode script file, that's it.

This seems to present a problem for non-coders. I was hoping to essentially learn through plagerism. Reference existing mods/addons (starting with simple ones) and see what values changed, maybe tweak a couple things and then create my own version to test a desired outcome.

Maybe it's worth getting a copy of Carrier Command for the extraction tool.

dariusz1983  [开发者] 2017 年 1 月 2 日 上午 10:33 
Well you don't need to buy CC. The workbench can extract the game data for you. Looking at other addons and mods is a good idea though. But you will have to gain some coding knowledge, classes and inheritence etc. otherwise some aspects of the code will remain a secret.
INFIDEL 2017 年 1 月 2 日 下午 1:34 
I can't seem to figure out how to extract a .pak file in the workbench. I'll think I'll stick to the in game editor and making edits to .scn files for the time being.

Thanks for the insight though.
riotintheair 2017 年 1 月 4 日 上午 12:06 
The path is probably "data/scripts/entities/..." to get to the addon config file as I've needed to add "data" to the start of paths to get to cfg resources added as part of addons.
最后由 riotintheair 编辑于; 2017 年 1 月 4 日 上午 12:21
dariusz1983  [开发者] 2017 年 1 月 4 日 上午 7:14 
引用自 riotintheair
The path is probably "data/scripts/entities/..." to get to the addon config file as I've needed to add "data" to the start of paths to get to cfg resources added as part of addons.

Ah, thanks for the hint. I'll try that out.
INFIDEL 2017 年 1 月 4 日 上午 7:28 
引用自 riotintheair
The path is probably "data/scripts/entities/..." to get to the addon config file as I've needed to add "data" to the start of paths to get to cfg resources added as part of addons.
Hey, thanks for the reply... but I'm kind of starting from square one with the workbench... I'll look around for more "Workbench 101" topics to see what I can learn.

Basically, I don't have a clue of what I'm doing:
  • Open Workbench
  • Editors->Game Editor
  • Panes->Scipts window
  • Find
  • (and this is where I'm stuck, assuming the steps above are even close to being correct)

Anyway, I'm a bit lost trying to extract .pak files... but I'm very curious to cross compare between the extracted game data and what is in the extracted mods/addons.

Thanks for the help!
dariusz1983  [开发者] 2017 年 1 月 4 日 上午 7:31 
引用自 INFIDEL
引用自 riotintheair
The path is probably "data/scripts/entities/..." to get to the addon config file as I've needed to add "data" to the start of paths to get to cfg resources added as part of addons.
Hey, thanks for the reply... but I'm kind of starting from square one with the workbench... I'll look around for more "Workbench 101" topics to see what I can learn.

Basically, I don't have a clue of what I'm doing:
  • Open Workbench
  • Editors->Game Editor
  • Panes->Scipts window
  • Find
  • (and this is where I'm stuck, assuming the steps above are even close to being correct)

Anyway, I'm a bit lost trying to extract .pak files... but I'm very curious to cross compare between the extracted game data and what is in the extracted mods/addons.

Thanks for the help!

I think you went a bit to far. Just to extract the game data, open the game launcher, go to the "Developer" tab, where the Workbench button is located, and click on the extract data button. That should do it.
INFIDEL 2017 年 1 月 4 日 上午 10:06 


引用自 dariusz1983
I think you went a bit to far. Just to extract the game data, open the game launcher, go to the "Developer" tab, where the Workbench button is located, and click on the extract data button. That should do it.

This extracts the core game data, but I didn't think it extracted the mod/addon .pak files. If it does, I don't know where to look for them... but I'll definitiely find them if they are there.

Is the data from the mod/addons dispersed throughout the extracted game data folder structure... I assumed that mod/addons were unaffected when clicking "Extract game data"
最后由 INFIDEL 编辑于; 2017 年 1 月 4 日 上午 10:10
dariusz1983  [开发者] 2017 年 1 月 4 日 上午 10:15 
Now I know what you're up to. Addons aren't there. Start the game. Go to Addons. Select the addon you're interested in and click the "copy and unpack" button. The game will restart. Afterwards you have the "open folder" foption for the unpacked addon copy.
INFIDEL 2017 年 1 月 4 日 上午 11:42 
Ok, I guess I revealed how inobservant I am. I have seen that copy and unpack button in the games addons interface a hundred times.

I just never thought to look there when trying to figure out how to unpack .pak files.

Sorry for all of the back and forth on figuring out such a simple step.
dariusz1983  [开发者] 2017 年 1 月 4 日 上午 11:45 
No worries. The resource cargo truck works now :). Have fun creating your scenario. I hope I get to play it one day.
< >
正在显示第 1 - 12 条,共 12 条留言
每页显示数: 1530 50