RUNNING WITH RIFLES
http://www.runningwithrifles.com/phpBB3/

Faction & Group of soldiers modding problems.
http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=7&t=2094
Page 1 of 2

Author:  Viet King [ Sun Feb 15, 2015 5:21 pm ]
Post subject:  Faction & Group of soldiers modding problems.

Hi there mates.
There is several of problems, that i can not solve.
This is Faction specific grenades and different vests to different groups.
Well, i think it's a common problem over here.
I did tried standard procedure to do this.
Just like this:
Code:
      <resources file="common_VWar.resources" />
      <resources file="US_V_default.resources" />
      <resources file="US_V_primaries.resources" />
      <resources file="US_V_grenades.resources" />
      <resources file="US_V_secondaries.resources"

But it is not seems to be useless, as it is not working.
Yes, i was tried to put "Clear_Grenades="1"" in "US_V_grenades.resources" file, and after this game crashed every time that i start the game.
Also, i was think that i can solve the problem by putting this in my faction in "default" group file:
Code:
      <resources clear_weapons="1" clear_grenades="1" clear_vehicles="0" clear_calls="1">
         <projectile key='hand_grenade.projectile' />
         <projectile key='hand_grenade_booby_trap.projectile' />
         
         <weapon key='medikit.weapon' />
         <weapon key='cover_resource.weapon' />
         <weapon key='ak47_vietnam.weapon' />
         <weapon key='dragunov_svd_vietnam.weapon' />
         <weapon key='pkm_vietnam.weapon' />
         <weapon key='mortar_resource_vietnam.weapon' />
         
         <call key='mortar1.call' />
         <call key='mortar2.call' />
         <call key='paratroopers2.call' />

         <carry_item key='vest_North_V_Military.carry_item' enabled="1"/>
         <carry_item key='vest2.carry_item' enabled="0"/>
      </resources>

And this time game completly stop working for me, at least while this code was in my "default" group of soldiers.
As you can see, i also tried to give to soldiers different vests.
I was thinking that problem goes to all this code with vests, and i remove it.
But it still do not working.

What i did wrong?
Is there exist another way to give to different group of soldiers different vests and grenades?

Author:  pasik [ Sun Feb 15, 2015 5:54 pm ]
Post subject:  Re: Faction & Group of soldiers modding problems.

Best way to see what the game is doing with the files is by running it with a command line parameter verbose and browsing through %appdata%\Running with rifles\rwr_game.log. This way you can verify if the game is doing what you'd expect it to be doing given your input, and then often realize where things are failing.

E.g. just launching the game with verbose gives you information such as
Code:
19:49:50:                                         : loading soldiers in map config
19:49:50:                                         : path: media/packages/vanilla/maps/lobby/map_config.xml
19:49:50:                                         : loading map config media/packages/vanilla/maps/lobby/map_config.xml
19:49:50:                                         : path: media/packages/vanilla/factions/green.xml
19:49:50:                                         : loading soldiers in media/packages/vanilla/factions/green.xml
19:49:51:                                         : path: media/packages/vanilla/models/soldier_animations.xml
19:49:51:                                         : path: media/packages/vanilla/models/soldier_a1.xml
19:49:51:                                         : path: media/packages/vanilla/models/soldier_a2.xml
...
19:49:51:                                         : resources tag found
19:49:51:                                         : path: media/packages/vanilla/factions/common.resources
19:49:51:                                         : loading faction resources in media/packages/vanilla/factions/common.resources
19:49:51:                                         : enabling medikit.weapon
19:49:51:                                         : enabling riot_shield.weapon
19:49:51:                                         : enabling cover_resource.weapon
19:49:51:                                         : enabling mg_resource.weapon
19:49:51:                                         : enabling m79.weapon
19:49:51:                                         : enabling minig_resource.weapon
....
19:49:51:                                         : resources tag found
19:49:51:                                         : path: media/packages/vanilla/factions/green_primaries.resources
19:49:51:                                         : loading faction resources in media/packages/vanilla/factions/green_primaries.resources
19:49:51:                                         : enabling m16a4.weapon
19:49:51:                                         : enabling m240.weapon
19:49:51:                                         : enabling m24_a2.weapon
19:49:51:                                         : enabling mp5sd.weapon
19:49:51:                                         : enabling mossberg.weapon
19:49:51:                                         : enabling l85a2.weapon
19:49:51:                                         : resources tag found
19:49:51:                                         : path: media/packages/vanilla/factions/green_secondaries.resources
19:49:51:                                         : loading faction resources in media/packages/vanilla/factions/green_secondaries.resources
19:49:51:                                         : enabling m72_law.weapon
19:49:51:                                         : enabling beretta_m9.weapon
...


Have you tried if the custom items work without making them faction specific?

Author:  Viet King [ Sun Feb 15, 2015 6:09 pm ]
Post subject:  Re: Faction & Group of soldiers modding problems.

pasik wrote:
Best way to see what the game is doing with the files is by running it with a command line parameter verbose and browsing through %appdata%\Running with rifles\rwr_game.log. This way you can verify if the game is doing what you'd expect it to be doing given your input, and then often realize where things are failing.

E.g. just launching the game with verbose gives you information such as
Code:
19:49:50:                                         : loading soldiers in map config
19:49:50:                                         : path: media/packages/vanilla/maps/lobby/map_config.xml
19:49:50:                                         : loading map config media/packages/vanilla/maps/lobby/map_config.xml
19:49:50:                                         : path: media/packages/vanilla/factions/green.xml
19:49:50:                                         : loading soldiers in media/packages/vanilla/factions/green.xml
19:49:51:                                         : path: media/packages/vanilla/models/soldier_animations.xml
19:49:51:                                         : path: media/packages/vanilla/models/soldier_a1.xml
19:49:51:                                         : path: media/packages/vanilla/models/soldier_a2.xml
...
19:49:51:                                         : resources tag found
19:49:51:                                         : path: media/packages/vanilla/factions/common.resources
19:49:51:                                         : loading faction resources in media/packages/vanilla/factions/common.resources
19:49:51:                                         : enabling medikit.weapon
19:49:51:                                         : enabling riot_shield.weapon
19:49:51:                                         : enabling cover_resource.weapon
19:49:51:                                         : enabling mg_resource.weapon
19:49:51:                                         : enabling m79.weapon
19:49:51:                                         : enabling minig_resource.weapon
....
19:49:51:                                         : resources tag found
19:49:51:                                         : path: media/packages/vanilla/factions/green_primaries.resources
19:49:51:                                         : loading faction resources in media/packages/vanilla/factions/green_primaries.resources
19:49:51:                                         : enabling m16a4.weapon
19:49:51:                                         : enabling m240.weapon
19:49:51:                                         : enabling m24_a2.weapon
19:49:51:                                         : enabling mp5sd.weapon
19:49:51:                                         : enabling mossberg.weapon
19:49:51:                                         : enabling l85a2.weapon
19:49:51:                                         : resources tag found
19:49:51:                                         : path: media/packages/vanilla/factions/green_secondaries.resources
19:49:51:                                         : loading faction resources in media/packages/vanilla/factions/green_secondaries.resources
19:49:51:                                         : enabling m72_law.weapon
19:49:51:                                         : enabling beretta_m9.weapon
...


Have you tried if the custom items work without making them faction specific?

Yes, and they work just fine.
I'll try to browse what is wrong by this command, thanks.

Author:  Viet King [ Mon Feb 16, 2015 6:48 am ]
Post subject:  Re: Faction & Group of soldiers modding problems.

Problem was i that game can not find "Resource" files that i put in faction configuration file.

Author:  Viet King [ Mon Feb 16, 2015 9:24 am ]
Post subject:  Re: Faction & Group of soldiers modding problems.

After some tests, game crashes again.
At the end of RWR_game.log -
Code:
14:17:54:                                         : savename _default.save
14:17:54:                                         : Setting init data, machine id = 0
14:17:54:                                         : init data set done
14:17:54:                                         : WARNING, unable to find throwable with slot 0

Most of the things stored in rwr_crashdumb.dmp

Author:  pasik [ Mon Feb 16, 2015 10:38 am ]
Post subject:  Re: Faction & Group of soldiers modding problems.

Can you send the crash dump to support@modulaatio.com?

Author:  Viet King [ Mon Feb 16, 2015 11:56 am ]
Post subject:  Re: Faction & Group of soldiers modding problems.

pasik wrote:
Can you send the crash dump to support@modulaatio.com?

Already did it.

Author:  pasik [ Mon Feb 16, 2015 4:13 pm ]
Post subject:  Re: Faction & Group of soldiers modding problems.

The crash points to a situation when initial backpack items are decided and given to a bot. The item existence config for the soldier group in question (I can't tell it what it is by looking at the dump, sorry) declares that this guy should have a carry item in the backpack (means that probability is not 0.0), but there are no carry items available for slot 0.

It actually prints out a wrong trace in the log saying "WARNING, unable to find throwable with slot X", while it should be about carry_items, not throwables.

I believe some solutions to overcome this would be to either disable carry items being created in backpacks, e.g.
Code:
<!-- backpack -->
         <item_class_existence class="carry_item" slot="0" probability="0.0" />

or add some of these carry items for the factions.

Vanilla has been set up so that all carry items are available in all factions by default due to how common.resources does not clear carry items. Are you clearing carry items or have you not loaded any of those?

Anyhow, I'll make the crash go away for the next update, but it's still a configuration error so the warning in log stays.

Author:  Viet King [ Mon Feb 16, 2015 6:31 pm ]
Post subject:  Re: Faction & Group of soldiers modding problems.

pasik wrote:
The crash points to a situation when initial backpack items are decided and given to a bot. The item existence config for the soldier group in question (I can't tell it what it is by looking at the dump, sorry) declares that this guy should have a carry item in the backpack (means that probability is not 0.0), but there are no carry items available for slot 0.

It actually prints out a wrong trace in the log saying "WARNING, unable to find throwable with slot X", while it should be about carry_items, not throwables.

I believe some solutions to overcome this would be to either disable carry items being created in backpacks, e.g.
Code:
<!-- backpack -->
         <item_class_existence class="carry_item" slot="0" probability="0.0" />

or add some of these carry items for the factions.

Vanilla has been set up so that all carry items are available in all factions by default due to how common.resources does not clear carry items. Are you clearing carry items or have you not loaded any of those?

Anyhow, I'll make the crash go away for the next update, but it's still a configuration error so the warning in log stays.

I did all what you said.
No hope, still crash.
Just crash.
Rwr_game.log is seems to be pretty good.
Code:
23:09:26:                                         : game reset
23:09:26:                                         : 1: ColourValue(0, 0.5, 0.1, 1), USA Military
23:09:26:                                         : 1: ColourValue(0, 0.5, 0.1, 1), South Vietnam Military
23:09:26:                                         : profile folder = savegames/_default.save
23:09:26:                                         : profiles at C:\Users\123\AppData\Roaming\Running with rifles\savegames/_default.save/
23:09:26:                                         : savename _default.save
23:09:26:                                         : Setting init data, machine id = 0
23:09:26:                                         : init data set done

And most of the things stored at crashdumb.Yes.again.
O-okay.
Just funny, when i put all the files of the mod into vanilla game preset and put all of my mod things into "all_"x".xml" it works just fine.
Ew.
Maybe i'll come back and will try make a mod after game release.
Thanks you for figuring out and help.
Much appreciate.

Author:  pasik [ Mon Feb 16, 2015 7:35 pm ]
Post subject:  Re: Faction & Group of soldiers modding problems.

Aw, that's a bummer.

If you want to share the mod you had created so far, someone, one of us devs probably, could check why it doesn't work with the game. There shouldn't be anything in the game that would require you to copy the mod files into vanilla package, and if there is, this would be a good way to solve it.

Crashes and load errors are a common thing that happen when creating mods when the game encounters unexpected configs. Crashes are of course nasty in that they tell you very little what was wrong as the game itself wasn't prepared for anything wrong to happen where it happened anyway.

Usually you can still solve the issues by going divide & conquer on them. Go back and start with small amount of changes, verify they work, and keep adding. Once it breaks, you'll know which particular item or change broke it.

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/