Author Topic: Problem delete unit  (Read 928 times)

0 Members and 1 Guest are viewing this topic.

Offline Hammer-17

  • Private
  • *
  • Posts: 8
    • View Profile
Problem delete unit
« on: May 21, 2014, 04:15:59 pm »
Hello everyone !

I would like delete the french light infantry, but when i deleted the lines of code of this units, when i launch the "build", there are several mistakes as "i didn't found the unit" or other.
So can you help me to delete the units with an easy way?

Thanks a lot.

Offline DaMonkey

  • King of FSE
  • *
  • Posts: 1677
    • View Profile
  • Nick: King DaMonkey I
  • Side: Confederacy
Re: Problem delete unit
« Reply #1 on: May 21, 2014, 04:57:57 pm »
I haven't touched the code in a while, so this may or may not work, but the problem is with the module_scripts still having the French Light Infantry in its code. If you want to remove the French Light infantry, you will also have to remove them in the module_scripts, which would in effect require you to modify other scripts containing the unit.

I would suggest one of the two for an easier approach:
1) Just replace it with another unit: I'm sure you can think of some other unit to replace it with.
2) Instead of deleting the line of code, cut it, and paste it after the line of code below:
Code
["multiplayer_end","{!}multiplayer_end","{!}multiplayer_end", 0, 0, 0, fac_austria, [], 0, 0, 0, 0, 0],

Again, I must stress that I haven't touched the NW Module System in a while, so this may be incorrect. No harm in trying, though.
Did you know that if you use 100% of your brain, you get godlike powers? true story.
Did you know that if you use 10% of received donations, you can release BCoF by now. true story

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: Problem delete unit
« Reply #2 on: May 22, 2014, 08:36:36 pm »
Nonono, that all is very complicated. In order to remove one unit from the game, all you need to go is change the fac_attribute to fac_neutral. For instance, in your very case, replace fac_france or fac_french_ranks with fac_neutral and that should work! If you'd like it back, just change the propery back