project-navigation
Personal tools

Author Topic: Reason for clearing Inv on de-team?  (Read 4705 times)

Offline xoft

  • Rookie
  • ***
  • Posts: 13
    • View Profile
Reason for clearing Inv on de-team?
« on: November 15, 2009, 07:05:01 pm »
I'd like to ask if there is any technical or other reason for clearing a soldier's inventory when the soldier is deselected from a ship? This is probably the most annoying thing I have had with this otherwise genius game.

My gaming style is "have ~15 soldiers in a base, 8 on a mission, when they come back wounded, heal them and use other personnel for missions in the meantime". Which means that I have to re-equip my soldiers with the same items over and over again when moving them between the hospital and the ship.

I found the code in client/campaign/cp_aircraft.c that does this (INVSH_DestroyInventory()), commenting the offending line out seems to work at the moment, but I may be mistaken, the catch may not be obvious. Perhaps the saves may become corrupt / items go missing over time / whatever. Can anyone with enough knowledge of the code comment on this?

Or is there a different approach, a different gaming style, that doesn't suffer from this issue?

Thanks.

Offline Viento

  • Rookie
  • ***
  • Posts: 96
    • View Profile
Re: Reason for clearing Inv on de-team?
« Reply #1 on: November 15, 2009, 08:00:16 pm »
Hiho!

I experience the same problem.

I would also like the soldiers to keep their personal items even if they are not on the ship. It is quite a lot to do if you have to equip every replacement soldier again and again, especially if you give them the full load of things, grenades, secondary weapon, etc.

I would rather buy/produce much more equipment, so that no piece of equipment needs to be used by different soldiers.

It would be great if this could be changed because it is just a lot of "fruitless clicking" before every mission.

It's a great game... but it would be even greater if this change could be implemented. =)

Andreas

 

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Reason for clearing Inv on de-team?
« Reply #2 on: November 15, 2009, 09:26:37 pm »
IIRC there have been several discussions on this 'issue' in these forums, introducing many more concepts including 'user defined equiment templates', which I personally like best. Try the forum search to figure out the pros and cons.

As for strategy: back when I played 2.2.1, I healed my wounded with medikits in the first round(s) of the next mission. Ok, you can call that an exploit if you want ;)

Offline xoft

  • Rookie
  • ***
  • Posts: 13
    • View Profile
Re: Reason for clearing Inv on de-team?
« Reply #3 on: November 15, 2009, 09:35:47 pm »
IIRC there have been several discussions on this 'issue' in these forums, introducing many more concepts including 'user defined equiment templates'

I haven't found much about this issue on the forums, that's why I asked directly.

I have found the "equipment templates" in the Wiki, I like the concept, but I is still consider it a "workaround".

As I've already written, I have found the offending command and tried removing it; I'm interested if there are some side effects I might be missing now. Perhaps re-posting (and re-phrasing) this question to the tech division of the forum might be a good idea.

Offline Borsti67

  • Squad Leader
  • ****
  • Posts: 164
    • View Profile
Re: Reason for clearing Inv on de-team?
« Reply #4 on: November 16, 2009, 01:02:37 pm »
It should be possible to contain the equipment when you have enough spare. Otherwise you will face some problems...
Let's say, you have 1 flamethrower. The soldier using it normally is sent to hospital, so you assign this weapon to another soldier.
When the 1st one is healed and you do not exchange him with the replacement guy, he simply can't get back his former equipment!
Anyway I'd also like to see it that way, with a warning when the previous constellation could not be restored. :)

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Reason for clearing Inv on de-team?
« Reply #5 on: November 16, 2009, 03:46:04 pm »
I'd like to ask if there is any technical or other reason for clearing a soldier's inventory when the soldier is deselected from a ship?

There is. Please don't get annoyed but understand coding is not easy. We don't (yet) handle getting out and putting back items to storage on (de-)equipping.

I found the code in client/campaign/cp_aircraft.c that does this (INVSH_DestroyInventory()), commenting the offending line out seems to work at the moment, but I may be mistaken, the catch may not be obvious. Perhaps the saves may become corrupt / items go missing over time / whatever. Can anyone with enough knowledge of the code comment on this?

By commenting out that call you've made the item unusable if you unassign and fire your soldier if I'm right. I didn't check it but I'm sure it causes very serious sideeffects.

-geever

Offline xoft

  • Rookie
  • ***
  • Posts: 13
    • View Profile
Re: Reason for clearing Inv on de-team?
« Reply #6 on: November 20, 2009, 12:05:34 pm »
We don't (yet) handle getting out and putting back items to storage on (de-)equipping.

That is pretty unbelievable, it seems working at the moment, at least one way - I cannot equip one gun to more soldiers, it goes out of inventory as soon as I use it. I haven't checked whether deequipping the gun puts it back into storage, but somehow I just supposed it would work.


By commenting out that call you've made the item unusable if you unassign and fire your soldier if I'm right. I didn't check it but I'm sure it causes very serious sideeffects.

Thanks for the insight, didn't think of that. But that is where the code line actually should have been all along - it doesn't make sense to deequip a soldier when he's deassigned from a ship, but it makes perfect sense to deequip him when he's being fired.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Reason for clearing Inv on de-team?
« Reply #7 on: November 20, 2009, 12:42:06 pm »
That is pretty unbelievable, it seems working at the moment, at least one way - I cannot equip one gun to more soldiers, it goes out of inventory as soon as I use it. I haven't checked whether deequipping the gun puts it back into storage, but somehow I just supposed it would work.

That's a special case, I've fixed things around that in the summer (you could assign a weapon to two soldiers if they were on different ships :) )
Check buy/sell screen. You will see your soldiers weapons/stuff as sellable there - they're in the storage.

Thanks for the insight, didn't think of that. But that is where the code line actually should have been all along - it doesn't make sense to deequip a soldier when he's deassigned from a ship, but it makes perfect sense to deequip him when he's being fired.

Of course that's the goal (keep equipment with soldier while hired). But we can't just rush ahead. A little change here breaks several stuff there and so. We're now concentrating on bugfixing of 2.3

-geever