Author Topic: Structure Kits In Factories  (Read 2513 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Structure Kits In Factories
« on: December 03, 2005, 10:47:38 AM »
I tried putting in structure kits in factories, but it either crashed the game or didn't make any bases. Could somebody give me a hand here? Thanks.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Structure Kits In Factories
« Reply #1 on: December 03, 2005, 06:59:13 PM »
If you start a structure factory with structure kits, I don't think the AI will use them for it's building groups. I think it will only build buildings that it also produces the kits for.

Also, to set the kit in the factory without crashing the game, you need to use SetFactoryCargo on the unit. Trying to set the cargo the same way a convec's cargo is set, or the way a weapon turret is specified won't work.
 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Structure Kits In Factories
« Reply #2 on: December 04, 2005, 06:15:13 AM »
I'm not trying to set an ai with structure kits, and I am using SetFactoryCargo... It just doesn't work very well for me...

I did get it working, but I was the only one who had a base.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Structure Kits In Factories
« Reply #3 on: December 04, 2005, 07:07:50 AM »
if you're using the hooville source, you may have accidentally changed the looping code. It should loop through all player's bases.
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Structure Kits In Factories
« Reply #4 on: December 04, 2005, 07:47:12 AM »
I changed the structure kit givy stuff and the bases worked fine, but no kits. A changed it around again and now OP2 crashes...  <_<  
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Structure Kits In Factories
« Reply #5 on: December 04, 2005, 01:03:19 PM »
well you must've done something wrong...
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Structure Kits In Factories
« Reply #6 on: December 04, 2005, 01:40:18 PM »
Really, you think? I'll accept that for my first attempt at it. ( the no-bases problem) But I'm not sure I can screw up a copy and paste. I just took it from the mapper's LoS Code Generator.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Structure Kits In Factories
« Reply #7 on: December 04, 2005, 04:16:35 PM »
ok. You have 2 sets of codes: the original (downloaded) version which works, and your version, which doesn't work; so i'd say something went wrong...  maybe you forgotten to copy some part of it, or whatever... something must've been changed, somehow.
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Structure Kits In Factories
« Reply #8 on: December 04, 2005, 06:07:36 PM »
It might help if you pasted some of the problem code. Adding kits to structure factories was sorta an odd topic. There were a few ways to do it, some better than others, and/or some requiring more changes than others.