Author Topic: ShipBuilder AI Mod  (Read 6684 times)

luigimax

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
ShipBuilder AI Mod
« on: November 17, 2010, 11:09:40 AM »
I created this mod to support a ship type / play style that is not supported by default. That is a ship that serves one purpose, build other ships. This mod actually makes the Ship construction subsystem actually usable.
(tested with 1.0.2.6)

Fist off however I would like to mention other modders that I based my work on:
what I based pretty much the entire project off of :: Refuel Auto-Pilot by erdrik
http://forums.blind-mind.com/index.php?topic=1597.0

and a small UI upgrade done by ouch which shows how long your ammo will last and how long your ship will remain operational if run off capacitors. (in the ship design screen)


How to install: extract into your Mod/ directory. Run game. Choose ShipBuilderAI from the drop down at the new game screen. (top)

How to use:
To use go to the Ship designer window. you will find ShipBuilder AI in the support tab. Put it on a ship. then add it in a new ship. DO NOT add a cargo bay. best used with some bussard engines, the Shipbuilder AI, and some construction bays. (add a bussard scoop to stop the intermitent refueling trips) and thats it. no control needed. And yes i do realize the AI should have a control requirement.

What this does:
The only way to add AI to a ship is by adding a sub system.
So what the AI does is just keep its reserves of resources above 50%. When its low, it finds the planet in the system with the most resources of what it needs and goes and acquires them.


I still need to add a keep draining resources from current planet algorithm as it tends to jump from planet to planet more than needed (it would require another loop tho,  :-[)

Things I learned, and suggestions to help make modding better for everyone:
I would like to be able to maintain a small piece of state from one update to the next. ex. current target data. As separate from the combat system. like an array that can only be accessed from the sub system (or just any, dont matter much). this will allow more complex AI modules to be created without the need for excessive looping.
Some way to remove a single command without having to wipe the whole command list and rebuild it.
A way to add priority ratings to commands. this can help reduce the command conflicts caused by other command generating modules (like the cargo bay).
A little more documentation for the command system. As it was rather annoying to do lots of trial and error.


Well let me know if anyone finds this useful or fun. And BlindMind, Keep up with the good work.

Firgof

  • BMS Administrator
  • Delusional
  • *
  • Posts: 1531
  • Karma: +175/-4
    • View Profile
Re: ShipBuilder AI Mod
« Reply #1 on: November 17, 2010, 11:20:59 AM »
I've listed your mod in the Mod Directory. :)

Nice work.  Looking forward to trying it out later today; will forward this to Reaper and Lucas (if he hasn't already seen it)
"Now it will punish you"

luigimax

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #2 on: November 17, 2010, 01:14:24 PM »
If you guys at BlindMind want to add it in the main game, That would be cool.

Also an idea for the multiple AI system (saw an admin talking about it with ouch) a drop-in AI sub-system like what I did for this mod, except not counting toward ship space usage. And the command priority of the AI's based on relative scale of AI components. The AI components can be in their own tab. An idea.

Also I forgot to mention, access to an event system would be nice. (I'm thinking like when an item in the order queue is done)

Not sure how hard it would be to add, just throwing ideas at you guys. If any idea can be done let us know.

Steiner

  • Star Ruler Tester (Group 2)
  • Delusional
  • *
  • Posts: 709
  • Karma: +81/-0
  • Magnetize, Magnetize!
    • View Profile
Re: ShipBuilder AI Mod
« Reply #3 on: November 17, 2010, 03:58:27 PM »
Wow, great idea there. Very well done, too. Yea, something like that should really find its way to vanilla.


Current Version: 1.5.1 for SR v.1.0.6.2

luigimax

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #4 on: November 17, 2010, 04:22:27 PM »
Thanks! I just noticed how not epic (was not expecting it to be) the default AI is. And also how effectively useless the construction yard is due to the planet focus of the cargo bay AI Trade.

I'm thinking up some way to store state in a ship by adding a custom state. will try it later.

Also What do you guys think about an annihilator AI. you add this AI to a 'thats not a moon' size ship and forget about it. It will automatically hunt down enemy systems. Something I like using, A seek and destroy AI. Build, Build, Relax and watch as your enemies burn. Gonna optimize ShipBuilder a bit first. Sound like an AI you would like to use?

ouch

  • Distracted
  • ***
  • Posts: 216
  • Karma: +17/-1
    • View Profile
Re: ShipBuilder AI Mod
« Reply #5 on: November 17, 2010, 09:54:25 PM »
Heh, A popular modding topic ship construction is... :)

I'm expanding on my auto resource transfering mod by including a version of the resource stealing beam that maintains an even amount of all 3 resources in a cargo bay. Because of the way cargo checking is done, any full ship will stop looking for resources, any ship needing resources will pursue a planet to take some from. It will also offload extra resources it doesn't need. (damn haulers, lol) It also targets all planets even friendly ones) It already works, I'm just adding a planetary mining beam at the moment. Then I'll release the new version.

After that I'm off to work on that advanced spiral map thingy... ;)

I'm not knocking your mod or anything, I'm just saying it was a monumental pain in the ass to get this to actually regulate available resources in the cargo bay, and on the planet. and I'm not removing it solely to spite the game engine, lol.
My Mods:
Auto Resource Transfering Subsystems (Fuel, Power, Ammo):
http://forums.blind-mind.com/index.php?topic=1427.0
Advanced spiral universe generation:
http://forums.blind-mind.com/index.php?topic=1536.0
Currently working on: Adv Spiral Universe Map

luigimax

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #6 on: November 18, 2010, 05:58:50 AM »
Lol. I know the pain involved. Not surprised that someone did the same thing, mobile ship building is handy. And hauler AI kinda suck. made more it for my own use anyway and decided to release it to see if anyone is interested. Tho I'm looking forward to seeing your other mods.

GGLucas

  • Dr. Evil
  • BMS Staff
  • Delusional
  • *
  • Posts: 1877
  • Karma: +300/-6
    • View Profile
Re: ShipBuilder AI Mod
« Reply #7 on: November 18, 2010, 04:15:54 PM »
Does this do anything that adding Fetch:Metals, Fetch:Electronics, Fetch:AdvParts tags to the construction bay doesn't do?

luigimax

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #8 on: November 18, 2010, 07:21:38 PM »
I never knew the tags had that kind of functionality attached to it as there is no clear description of stuff like that anywhere. So, likely not. Would have used that approach If I knew about it before. Darn.

GGLucas

  • Dr. Evil
  • BMS Staff
  • Delusional
  • *
  • Posts: 1877
  • Karma: +300/-6
    • View Profile
Re: ShipBuilder AI Mod
« Reply #9 on: November 18, 2010, 07:26:57 PM »
Yeah that one was actually added very recently, steiner requested it for his mod so I added it. Forgot to add it to the changelog.

Since Star Ruler changes a lot, it's very hard to keep documentation up-to-date. You're probably best served by hopping into the irc and bugging me with questions :P

The added advantage is that if you need something simple to be added/hooked for you mod there's a good chance I can do it for you.

luigimax

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #10 on: November 21, 2010, 09:59:16 AM »
No problem. Its excellent so far. Next time I have a question Ill consult the irc Channel.

ashen

  • Newbie
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #11 on: November 23, 2010, 02:06:20 AM »
Yeah that one was actually added very recently, steiner requested it for his mod so I added it. Forgot to add it to the changelog.

Since Star Ruler changes a lot, it's very hard to keep documentation up-to-date. You're probably best served by hopping into the irc and bugging me with questions :P

The added advantage is that if you need something simple to be added/hooked for you mod there's a good chance I can do it for you.
I love dev's that promote modding!  ;D

luigimax

  • Newbie
  • *
  • Posts: 7
  • Karma: +1/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #12 on: November 23, 2010, 09:06:34 AM »
Well, games with a modding community last longer. Just think, people still play total annihilation.
Plus I imagine it helps the devs to trouble shoot the game.

s20dan

  • Newbie
  • *
  • Posts: 23
  • Karma: +2/-0
    • View Profile
Re: ShipBuilder AI Mod
« Reply #13 on: November 23, 2010, 11:53:56 AM »
Quote
I love dev's that promote modding!  ;D

+1  ;D

 After 'that other 4x game' this is a breath of fresh air :)