[A16] Combat Realism [closed]

Started by skyarkhangel, November 11, 2016, 03:20:29 PM

Previous topic - Next topic

dkbrk

Quote from: MasterZ01 on December 27, 2016, 03:39:39 PM
It seems whenever I order a colonist to pickup clothing they do and will, however if I ever want them to remove it from their inventory they can't. They can wear and take off clothing but if it's placed in their inventory, they can never remove the clothing item again.

I reproduced this in version 1.6.9.1, but it isn't present in the master branch. Instead, when a colonist picks up an item of clothing it's immediately hauled to an appropriate stockpile (if available) or dropped on the ground.

You can grab the main development branch here: https://codeload.github.com/skyarkhangel/CombatRealism/zip/master

MasterZ01

Quote from: dkbrk on December 27, 2016, 05:07:05 PM
Quote from: MasterZ01 on December 27, 2016, 03:39:39 PM
It seems whenever I order a colonist to pickup clothing they do and will, however if I ever want them to remove it from their inventory they can't. They can wear and take off clothing but if it's placed in their inventory, they can never remove the clothing item again.

I reproduced this in version 1.6.9.1, but it isn't present in the master branch. Instead, when a colonist picks up an item of clothing it's immediately hauled to an appropriate stockpile (if available) or dropped on the ground.

You can grab the main development branch here: https://codeload.github.com/skyarkhangel/CombatRealism/zip/master

I removed the version I had(1.6.9.1) from the mod load list. deleted it, and downloaded the version from the link provided. Started up Rimworld, activated it right after the Core, and then restarted Rimworld as the usual process of mod Installation goes. I created a stockpile and made sure the permissions accepted that article of clothing. I then tried repeating the issue once again to see if it still existed. Unfortunately, for some reason the bug still persists and my colonist picks up the clothing and places it in their inventory instead of hauling it to the stockpile like you described. I can provide further information if requested.

dkbrk

Quote from: MasterZ01 on December 27, 2016, 05:44:16 PM
Quote from: dkbrk on December 27, 2016, 05:07:05 PM
Quote from: MasterZ01 on December 27, 2016, 03:39:39 PM
It seems whenever I order a colonist to pickup clothing they do and will, however if I ever want them to remove it from their inventory they can't. They can wear and take off clothing but if it's placed in their inventory, they can never remove the clothing item again.

I reproduced this in version 1.6.9.1, but it isn't present in the master branch. Instead, when a colonist picks up an item of clothing it's immediately hauled to an appropriate stockpile (if available) or dropped on the ground.

You can grab the main development branch here: https://codeload.github.com/skyarkhangel/CombatRealism/zip/master

I removed the version I had(1.6.9.1) from the mod load list. deleted it, and downloaded the version from the link provided. Started up Rimworld, activated it right after the Core, and then restarted Rimworld as the usual process of mod Installation goes. I created a stockpile and made sure the permissions accepted that article of clothing. I then tried repeating the issue once again to see if it still existed. Unfortunately, for some reason the bug still persists and my colonist picks up the clothing and places it in their inventory instead of hauling it to the stockpile like you described. I can provide further information if requested.

I installed the mod directly from the link I provided, and tested it again. Here's what I did and observed:

1. Start a new colony
2. Select a colonist, tell them to drop their jacket
    The jacket is dropped on the ground and marked as forbidden.
3. Tell the colonist to pick up the jacket
    The jacket is immediately dropped back on the ground
4. Draft the colonist, tell them to pick up the jacket
    The jacket appears in the inventory
5. Tell the colonist to drop the jacket
    The colonist briefly gets the job "Removing synthread jacket (normal)", the jacket stays in the inventory
6. Undraft the colonist
    The jacket is immediately dropped
7. Create a stockpile, tell the colonist to pick up the jacket
    The jacket is picked up, dropped, picked up again, and hauled to the stockpile
8. Draft the colonist, tell them to pick up the jacket, and move them away from the stockpile
    The jacket is picked up and stays in the inventory
9. Undraft the colonist
    The jacket is dropped, picked up again and hauled to the stockpile

There is definitely a bug there, but it's not the same behaviour as 1.6.9.1 and I don't think it's critical.

Didact04

Wowie, A16 really threw a wrench into this mod, huh?

carpediembr

Anyone having issues with mortar shells?

Aparently they are turning into Vanilla Mortar Shells.

Thundercraft

#170
Quote from: MrWeeGee on December 26, 2016, 07:14:55 AM
A different problem I'm having, is it seems that none of the melee weapons or guns can be smelted for resources, only turrets and ammo. Guns are missing from the 'smelt weapon' section, and it ignores your melee weapon selections saying "need materials." Smelting slag and destroying weapons works fine though. New game without CR returns it to normal.

I looked at the code in the latest release (1.6.9.2) and compared it with vanilla. The Weapons_Guns.xml and Weapons_Melee.xml in vanilla A16 have <smeltable>true</smeltable> tags, while in Combat Realism they do not. That's why.

While guns in CR do have <smeltProducts> tags, all that does is specify how much resources to give if it were possible to smelt them. Anyway, the <smeltProducts> is only defined in the "BaseGun" abstract which defines all guns and is defined with <Steel>20</Steel>.

Looking at the wiki page for the Electric smelter and comparing that to the material costs for various guns, one sees that vanilla behavior is to return (roughly) a paltry 25% of the materials required to build them. That may be vanilla, but think this is unfair and unrealistic. Also, that doesn't take the skill of the Smelter operator into consideration. The actual return is likely going to be even less.

So, in my local copy of CR, I added <smeltable>true</smeltable> tags for both guns and melee. Then I added <smeltProducts> tags for each gun, so I could specify what the return should be for each gun on a case by case basis:

  • pistol : <Steel>23</Steel> : {That's 75% of the required 30 Steel to build.}
  • pump shotgun : <Steel>68</Steel> : {That's 75% of the required 90 Steel to build.}
  • survival rifle : <Steel>68</Steel> : {That's 75% of the required 90 Steel to build.}
  • assault rifle : <Steel>75</Steel> : {That's 75% of the required 100 Steel to build.}
  • sniper rifle : <Steel>75</Steel> : {That's 75% of the required 100 Steel to build.}
  • Machine pistol : <Steel>68</Steel> : {That's 75% of the required 90 Steel to build.}
  • heavy SMG : <Steel>98</Steel> : {That's ~75% of the required 130 Steel to build.}
  • incendiary launcher : <Steel>105</Steel> : {That's 75% of the required 140 Steel to build.}
  • LMG : <Steel>113</Steel> : {That's ~75% of the required 150 Steel to build.}
  • charge rifle : <Steel>90</Steel> : {That's 75% of the required 120 Steel to build.}
  • minigun : <Steel>250</Steel> + <Plasteel>30</Plasteel> {Mechanoid, has a whopping 20 <Mass>!}
  • doomsday rocket launcher : <Steel>128</Steel> : {That's ~75% of the 170 Steel to build.}
  • triple rocket launcher : <Steel>90</Steel> : {That's 75% of the required 120 Steel to build.}
  • heavy charge blaster : <Steel>250</Steel> + <Plasteel>35</Plasteel> {Mechanoid, has a whopping 25 <Mass>!}
  • inferno cannon : <Steel>200</Steel> + <Plasteel>30</Plasteel> {Mechanoid, has a huge 10 <Mass>!}
  • charge lance : <Steel>160</Steel> + <Plasteel>25</Plasteel> {Mechanoid, has a large 7 <Mass>!}

I tested this in-game and it seems to work. At least, both guns and melee are smeltable for me now. And larger, more expensive guns seem to give me larger returns.

Edit:
Well... The above works for most guns. But it seems that Mechanoid guns are not actually smeltable. A colonist will grab them and act like they're smelting them. However, the weapon disappears as soon as it's placed on the smelter and no materials are returned.

If I had to guess, I'd say this may have to do with how Mechanoid guns are missing <costList> tags. Perhaps the game assumes that they aren't supposed to be smeltable? Or maybe it ignores <smeltProducts> tags now and relies on <costList>?

As such, perhaps for guns it is wiser to insert <smeltable>true</smeltable> tags for each gun, rather than insert it into the "BaseGun" abstract for all of them - and only for guns with <costList>?

cerhio

Quote from: carpediembr on December 28, 2016, 12:40:33 AM
Anyone having issues with mortar shells?

Aparently they are turning into Vanilla Mortar Shells.

Yup, I wasn't sure if it was just because I kept them in those shelves or not. It really fucked  me up when I was being raided.

dkbrk

Quote from: Thundercraft on December 28, 2016, 12:58:34 AM
Quote from: MrWeeGee on December 26, 2016, 07:14:55 AM
A different problem I'm having, is it seems that none of the melee weapons or guns can be smelted for resources, only turrets and ammo. Guns are missing from the 'smelt weapon' section, and it ignores your melee weapon selections saying "need materials." Smelting slag and destroying weapons works fine though. New game without CR returns it to normal.

I looked at the code in the latest release (1.6.9.2) and compared it with vanilla. The Weapons_Guns.xml and Weapons_Melee.xml in vanilla A16 have <smeltable>true</smeltable> tags, while in Combat Realism they do not. That's why.

While guns in CR do have <smeltProducts> tags, all that does is specify how much resources to give if it were possible to smelt them. Anyway, the <smeltProducts> is only defined in the "BaseGun" abstract which defines all guns and is defined with <Steel>20</Steel>.

Looking at the wiki page for the Electric smelter and comparing that to the material costs for various guns, one sees that vanilla behavior is to return (roughly) a paltry 25% of the materials required to build them. That may be vanilla, but think this is unfair and unrealistic. Also, that doesn't take the skill of the Smelter operator into consideration. The actual return is likely going to be even less.

So, in my local copy of CR, I added <smeltable>true</smeltable> tags for both guns and melee. Then I added <smeltProducts> tags for each gun, so I could specify what the return should be for each gun on a case by case basis:

  • pistol : <Steel>23</Steel> : {That's 75% of the required 30 Steel to build.}
  • pump shotgun : <Steel>68</Steel> : {That's 75% of the required 90 Steel to build.}
  • survival rifle : <Steel>68</Steel> : {That's 75% of the required 90 Steel to build.}
  • assault rifle : <Steel>75</Steel> : {That's 75% of the required 100 Steel to build.}
  • sniper rifle : <Steel>75</Steel> : {That's 75% of the required 100 Steel to build.}
  • Machine pistol : <Steel>68</Steel> : {That's 75% of the required 90 Steel to build.}
  • heavy SMG : <Steel>98</Steel> : {That's ~75% of the required 130 Steel to build.}
  • incendiary launcher : <Steel>105</Steel> : {That's 75% of the required 140 Steel to build.}
  • LMG : <Steel>113</Steel> : {That's ~75% of the required 150 Steel to build.}
  • charge rifle : <Steel>90</Steel> : {That's 75% of the required 120 Steel to build.}
  • minigun : <Steel>250</Steel> + <Plasteel>30</Plasteel> {Mechanoid, has a whopping 20 <Mass>!}
  • doomsday rocket launcher : <Steel>128</Steel> : {That's ~75% of the 170 Steel to build.}
  • triple rocket launcher : <Steel>90</Steel> : {That's 75% of the required 120 Steel to build.}
  • heavy charge blaster : <Steel>250</Steel> + <Plasteel>35</Plasteel> {Mechanoid, has a whopping 25 <Mass>!}
  • inferno cannon : <Steel>200</Steel> + <Plasteel>30</Plasteel> {Mechanoid, has a huge 10 <Mass>!}
  • charge lance : <Steel>160</Steel> + <Plasteel>25</Plasteel> {Mechanoid, has a large 7 <Mass>!}

I tested this in-game and it seems to work. At least, both guns and melee are smeltable for me now. And larger, more expensive guns seem to give me larger returns.

Edit:
Well... The above works for most guns. But it seems that Mechanoid guns are not actually smeltable. A colonist will grab them and act like they're smelting them. However, the weapon disappears as soon as it's placed on the smelter and no materials are returned.

If I had to guess, I'd say this may have to do with how Mechanoid guns are missing <costList> tags. Perhaps the game assumes that they aren't supposed to be smeltable? Or maybe it ignores <smeltProducts> tags now and relies on <costList>?

As such, perhaps for guns it is wiser to insert <smeltable>true</smeltable> tags for each gun, rather than insert it into the "BaseGun" abstract for all of them - and only for guns with <costList>?

See https://github.com/skyarkhangel/CombatRealism/issues/45 and https://github.com/skyarkhangel/CombatRealism/pull/49/commits/1c8d780ee3241fab20f5bcc0977be125b3008d15.

I had already submitted the merge request when I saw your post, but when I did I went back to investigate if it would be viable to use <smeltProducts> to manually specify the values (I agree with you that 25% seems like a rather small return).  Unfortunately, it's rather fragile, so right now we're going with <smeltable>, which works well, except for the things that aren't smeltable due to not being producible (such as the inferno cannon) and some other things like turrets.

You can try out the changes yourself here: https://codeload.github.com/skyarkhangel/CombatRealism/zip/master

In future, it would probably be a better idea to have this sort of discussion on github. You can check if there's already an issue, and it's easier to coordinate and prevent duplication of work that way.

carpediembr

Quote from: cerhio on December 28, 2016, 03:31:24 AM
Quote from: carpediembr on December 28, 2016, 12:40:33 AM
Anyone having issues with mortar shells?

Aparently they are turning into Vanilla Mortar Shells.

Yup, I wasn't sure if it was just because I kept them in those shelves or not. It really fucked  me up when I was being raided.
Aparently the latest release fixes that issue.


New issue: Turrets not shooting over embrasures/sandbags, can anyone else confirm?

See: http://i.imgur.com/BZfOOe0.jpg

cerhio

Quote from: carpediembr on December 28, 2016, 08:18:00 AM
Quote from: cerhio on December 28, 2016, 03:31:24 AM
Quote from: carpediembr on December 28, 2016, 12:40:33 AM
Anyone having issues with mortar shells?

Aparently they are turning into Vanilla Mortar Shells.

Yup, I wasn't sure if it was just because I kept them in those shelves or not. It really fucked  me up when I was being raided.
Aparently the latest release fixes that issue.


New issue: Turrets not shooting over embrasures/sandbags, can anyone else confirm?

See: http://i.imgur.com/BZfOOe0.jpg

Damn, you had me excited up until that last sentence :(

AseaHeru

 Had no issues with turrets not shooting in my games, but havent tried the autoturrets.

porcupine

Quote from: carpediembr on December 28, 2016, 08:18:00 AM
New issue: Turrets not shooting over embrasures/sandbags, can anyone else confirm?

See: http://i.imgur.com/BZfOOe0.jpg

Haven't tried RW at all on this alpha (waiting for the bugs to work out a bit more, and to finish my current Factorio/Bobs run), but have you tried moving the turrets back a tile or two from the bags/embrasures?

I say this, because I remember on a previous release there was a similar issue (which was either introduced, or mitigated by having 1-2 spaces between, can't recall which).

Dacksi

Hi, sorry for my bad english (Google translator)

Since I have installed the mod, I can build ammunition and reload but no one shoots now at pirates or animals. Also the automatic cannon does not.

Can there help me, please.

AseaHeru

 Are their weapons set to snapshot or aimed, instead of hold fire?

Dacksi

Have tried all shot modes, there is no shot.