Author Topic: AI Empire v0.1.1; now with finer control  (Read 13902 times)

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
AI Empire v0.1.1; now with finer control
« on: August 30, 2010, 11:24:23 PM »
New in 0.1.1

All of these buttons affect the AI, now:



- with 'Defense' also covering fighter management.

AI Empire no longer modifies basic_ai.as; instead player empires are given their own derived AI script.

New in 0.1.0

Updated for 1.0.2.0

There are new options in the AI Controls window, but only the old ones (Governors, War, Peace, Trade, Research, Build) yet do anything.

The AI was auto-refusing treaties when you told it not to consider them; it now leaves them alone.

New in 0.0.10

Updated for 1.0.6.  GID_StrikeCraft (Fighter) now inferred for designs scale-3 or below hat have weapons and engines.

Due some problem with the box formation, AI formation default is 'Wedge' for this version.

New in 0.0.9

layout_win.as and friends restored to AI Empire, with their determination of GIDs for your saved layouts.  Apparently I forgot that vanilla SR didn't do this...

New in 0.0.8

AI suppression structures are gone; use the AI Controls button in your Empire window.



You can now prevent the AI from changing governor types.

the Renovate All button there will be replaced with a button that opens an Empire Tools window as I develop more of them.

New in 0.0.7

GID_Lead was a hole in the AI-goal-inferencing system of the previous version.  If you want the AI to give a fleet to a ship, &c, add the Fleet Bridge subsystem to it.

You can build AI Suppression structures on planets.  When they're constructed, they turn parts of the AI off.  When they're destroyed, those parts are turned back on.  You can prevent the AI from declaring war, accepting or offering peace, pursuing research goals, building ships, and accepting or offering trade agreements, independently.

New in 0.0.6

Every time you save a blueprint, an AI goal is inferred based on its stats (thrust, DPS) and saved with it.  So if you create a new colonizer, and obsolete the old one, the AI will build your new colonizer whenever it wants to colonize.

This is how goals are determined:
Code: [Select]
if(hs.getHint("Leader") > 0.f) return GID_Lead;

if(hasWeapons && hasEngines && isHuge) return GID_Annihilate;
else if(hasWeapons && hasEngines && isTiny) return GID_StrikeCraft;
else if(hasWeapons && hasEngines) return GID_Fight;
else if(hasEngines && hasColony) return GID_Colonize;
else if(hasEngines && hasCargo) return GID_Trade;
else if(hasEngines) return GID_Explore;
else if(hasWeapons) return GID_StaticDefense;
else return GID_Invalid;

A ship 'isHuge' if it scales above 150; a ship 'isTiny' if it scales at or below 3.

New in 0.0.1

[strike]OK, this is a pretty straightforward mod that makes a one-line change, but:[/strike]

1. It took me more than a few minutes to rediscover the one-line change, searching the forums, and

2. It's a fun change, leaving you to focus on ship design, planetary management, and micromanaging combat.

VERSIONS:
v0.1.1: give meaning to the dummy buttons; fork basic_ai.as
v0.1.0: updated for 1.0.2.0, dummy buttons, treaty bugfix
v0.0.10: updated for 1.0.6, infers fighter GID.
v0.0.9: fixed regression in GID determination
v0.0.8: better UI for AI control, suppression of governor changes, Renovate All
v0.0.7: added AI Suppression, Fleet Bridge
v0.0.6: updated for 1.0.1.4, uses your layouts
v0.0.5: updated for 1.0.1.2
v0.0.4: updated to 1.0.1.0
v0.0.3: removed errant structures.txt
v0.0.2: updated to use the new AI script
v0.0.1: initial release.

PLANNED:
v0.1.2: extend the layout window so that you can create a scout with weapons, etc, by overriding inferred design goals.
v0.1.3: more empire macromanagement tools.
« Last Edit: October 19, 2010, 02:45:09 PM by ayrnieu »

vinc3nt

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Let the AI direct your empire.
« Reply #1 on: August 31, 2010, 07:35:04 AM »
OK, this is a pretty straightforward mod that makes a one-line change, but:

1. It took me more than a few minutes to rediscover the one-line change, searching the forums, and

2. It's a fun change, leaving you to focus on ship design, planetary management, and micromanaging combat.

So the AI in your empire controls the ships only? Like in battles?

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: Let the AI direct your empire.
« Reply #2 on: August 31, 2010, 08:43:03 AM »
No, it controls everything, but its decisions are very easily overridden - although it's pretty eager to accept peace agreements with people I've declared war on, am moving a fleet into the territory of, and will declare war on again once this fleet is in place and the peace treaty expires.  If you take no action, it should fare as well as a normal AI would.

Dakkon

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Let the AI direct your empire.
« Reply #3 on: August 31, 2010, 09:26:58 AM »
Just tried this, very good for playing it in the background.

RazorTS

  • Sentient
  • **
  • Posts: 187
  • Karma: +2/-0
    • View Profile
Re: [REL] AI Empire v0.0.2 - uses the new AI script.
« Reply #4 on: September 02, 2010, 06:21:48 AM »
And its great for game testing. Well done

Fritz

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: [REL] AI Empire v0.0.2 - uses the new AI script.
« Reply #5 on: September 02, 2010, 09:47:52 AM »
I'd love to see something like in DW where you can set the AI to manage everything that you don't like being bothered with.

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: [REL] AI Empire v0.0.2 - uses the new AI script.
« Reply #6 on: September 02, 2010, 09:56:11 AM »
A window with checkboxes that have the AI handle diplomacy, only trade, only colonization, etc.?  I think there might be a client/server problem with that, in AngelScript, but I'll look into it.

What exactly do you want to be able to tell the AI to do?  I haven't played DW.

booface

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: [REL] AI Empire v0.0.2 - uses the new AI script.
« Reply #7 on: September 02, 2010, 10:34:06 AM »
i like it thx helps alot with 10000 star galaxy btw i had the research cheat building in my game with this mod is there any way to remove it sorry i dont know how to do mods myself and i like this mod but dont want the cheat building.

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: [REL] AI Empire v0.0.2 - uses the new AI script.
« Reply #8 on: September 02, 2010, 10:47:28 AM »
Oh, woops.

Just delete the Sub Systems directory in the mod, which has structures.txt

booface

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: [REL] AI Empire v0.0.2/3 - uses the new AI script.
« Reply #9 on: September 02, 2010, 10:52:48 AM »
ok did it thx again this is a very helpful mod

vinc3nt

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: [REL] AI Empire v0.0.2/3 - uses the new AI script.
« Reply #10 on: September 02, 2010, 03:56:42 PM »
Keep up the good work on this mod  ;). I always use this mod as I am very bad at running all my empire at once. So the AI (or military, economic and diplomatic advisors as I call them/it) helps me to run the empire.

This mod is recommended for anyone with a high number of systems in their galaxy

vinc3nt

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: [REL] AI Empire v0.0.2/3 - uses the new AI script.
« Reply #11 on: September 17, 2010, 03:18:25 PM »
can you update this for the new patch? thank you ;)

Orophin

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
  • I am a rock. I am an island.
    • View Profile
    • STEAM
Re: [REL] AI Empire v0.0.2/3 - uses the new AI script.
« Reply #12 on: September 18, 2010, 12:22:24 PM »
Yeah, it doesn't seem to be working properly with the new patch for me.

Any chance of an update?
"He was an avalanche from an unexpected quarter. He was a thunderbolt from a clear sky."

Brady

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [REL] AI Empire v0.0.2 - uses the new AI script.
« Reply #13 on: September 22, 2010, 04:36:54 AM »
A window with checkboxes that have the AI handle diplomacy, only trade, only colonization, etc.?  I think there might be a client/server problem with that, in AngelScript, but I'll look into it.

What exactly do you want to be able to tell the AI to do?  I haven't played DW.

This would be great...
Need to turn off diplomacy and AI research managment...
« Last Edit: September 22, 2010, 04:47:16 AM by Brady »

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.6 - now uses your layouts
« Reply #14 on: October 03, 2010, 01:23:31 AM »
bump.  Please let me know if you want anything else from this mod.

acantoni

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.0.6 - now uses your layouts
« Reply #15 on: October 03, 2010, 05:40:08 AM »
Thx for this mod, its quite nice to play in background :)
Since you ask here is something i'd like :)
A simple menu that tells what the ai can do and what can't

For instance i'd like to have the possibility to disable the autodiplomacy, or disable the ai producing ships and leaving them on my control, or disable the ai moving ship around, and so on :D

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #16 on: October 03, 2010, 01:15:38 PM »
bump, you can now disable parts of the AI; see first post.

erdrik

  • Sentient
  • **
  • Posts: 199
  • Karma: +22/-0
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #17 on: October 03, 2010, 02:05:15 PM »
You've gotten farther along in the AI scripting than me, maybe you'll know:
I want to add goal IDs to ships a human builds.

Ive been trying to get my Auto Refuel code to ID tankers based on that goal entry but every ship that isn't built by the AI is flaged as INVALID.

Is there a way to look at the empire_default.xml and get the goal from a design with a matching name?


Erdrik's Mods:
Refuel Auto-Pilot

Tordash

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #18 on: October 03, 2010, 02:10:41 PM »
For a minor change, this has fantastic effects.  I feel like I'm guiding a civilization with its own governments and behaviors, and less like the guy suckered into managing the toggle switches for the universe.  I don't think I'd want to play large games without this, again!

I'm new to the game, so I'm still getting used to the way it's written.  That said...

I like that we can turn parts of the AI on/off, but I think that it would still be better if the controls could somehow be put into the Empire menu.  Are you using the planet structure lists to store the toggle information?  Maybe there's somewhere else that could be used for Empire-level toggles.

What about the parts of the AI that sets governors for planets?  I keep running into planets that are perfectly suited for certain specializations (mining, farming, etc.), but I cannot set those planets, specifically, to not have their governors changed.  The individual planet structure information may be good for this--just a structure for a quick toggle.

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #19 on: October 03, 2010, 02:21:36 PM »
GoalIDs are stored in HullLayout.metadata - it's a property of the layout, not the ship in space, and it doesn't matter who builds them.  Neither the AI nor the player will have a GID_Tanker; that isn't part of the Enum, and loadDefaultLayouts doesn't look for the string.

So you should start by editing that part of Game Data\scripts\server\include\empire_lib.as

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #20 on: October 03, 2010, 02:39:39 PM »
Quote
For a minor change, this has fantastic effects.

I agree :)

Quote
it would still be better if the controls could somehow be put into the Empire menu.

Star Ruler has two separate AngelScript engines, a client and server; the GUI's in one engine and the AI's in the other, so communicating directives to the AI is a little tricky.  The 'magical structures' path has a server structure definition that calls an server effect that calls a server function that sets a server empire setting - and then the AI independently notices the empire setting and reads it.

If someone else did the GUI for me, the best way I have right now to connect it to the AI is by having the GUI create new ship designs every time you press the 'apply' button, with some changes to the layout window so that you'd never see the magical designs.  Messy, right?

I'll look at governors.

erdrik

  • Sentient
  • **
  • Posts: 199
  • Karma: +22/-0
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #21 on: October 03, 2010, 02:44:37 PM »
Ive already added GID_Tanker to empire_lib.as
And I have been printing the goalID's in HullLayout.metadata already.
(its how I know something is wrong)

further whenever I build haulers, they come out as "0" which is what INVALID is:
Code: [Select]
enum GoalID {
GID_Invalid = 0,
GID_Lead = 1,
GID_Fight,
GID_Trade,
GID_Explore,
GID_Colonize,
GID_Defense,
GID_Annihilate,
GID_StaticDefense,
GID_FightSpecialised,
GID_Tanker
};

yet every ship the AI builds has the proper goal ID's..
Erdrik's Mods:
Refuel Auto-Pilot

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #22 on: October 03, 2010, 02:50:10 PM »
Please make a new post, and attach your code, and someone can look at it.

Tordash

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #23 on: October 03, 2010, 02:55:09 PM »
Star Ruler has two separate AngelScript engines, a client and server; the GUI's in one engine and the AI's in the other, so communicating directives to the AI is a little tricky.  The 'magical structures' path has a server structure definition that calls an server effect that calls a server function that sets a server empire setting - and then the AI independently notices the empire setting and reads it.

Ah!  So it's just pulling data from recordsets (whatever those may be)?  Is there any other set that could be used?  What about resources?  Is it structured as a record per resource, ID'ed to the player (playerID; resource; varresource; etc.), or is it a flat record with a single list of a set list of resources (playerID; varfood; varmetal; etc.)?  Does the game regularly query that for the AI?

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #24 on: October 03, 2010, 03:01:04 PM »
The AI is pulling data from Empire.getSetting().  Yes.  What are 'resources'?  It's per Empire - the AI knows what Empire it's dealing with.  'flat record'...?  .getSetting() is probably implemented as an AngelScript dictionary, which is probably implemented as a hash table and less likely as an associative array, but what does this have to do with anything?  The AI queries Empire.getSetting() vastly more often than the player ever changes it -- I'm tempted to distribute AI_Empire with a small script, to run outside of Star Ruler, that limits the AI in the way you want.

Tordash

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.0.7; can now suppress parts of the AI
« Reply #25 on: October 03, 2010, 03:10:46 PM »
The AI is pulling data from Empire.getSetting().  Yes.  What are 'resources'?  It's per Empire - the AI knows what Empire it's dealing with.  'flat record'...?  .getSetting() is probably implemented as an AngelScript dictionary, which is probably implemented as a hash table and less likely as an associative array, but what does this have to do with anything?  The AI queries Empire.getSetting() vastly more often than the player ever changes it -- I'm tempted to distribute AI_Empire with a small script, to run outside of Star Ruler, that limits the AI in the way you want.

Sorry if that was a little confusing.  As stated, I haven't worked with any of the code from this.  I think I've spent an overall five minutes digging into it, thus far.

Meant to say "flat table", and really more of an '-ish situation.  Anyway....

Sounds like that, yeah, having it run outside may be a very reasonable way to set it up--at least for now.  Perhaps in the future, a modification or something added to the in-game GUI could interact with that.

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.8; vastly better UI, small changes.
« Reply #26 on: October 04, 2010, 11:01:40 PM »
Bump for new version.  Please suggest macromanagement tools.  Right now I have these in mind:

1. Push a button to auto-colonize nearby systems.

2. Hotkeys to switch between groups of pins.

3. Push a button to pin only shipyard worlds / galactic capital / fleet commanders.

4. Variants of the Object List - just all of my planets, just ships, just above scale 6, etc.

(The GUI doesn't use the crazy magical-hull-layouts method I was talking about above.  It's embarrassingly direct.)

Bartje

  • Star Ruler Beta Tester
  • Distracted
  • *
  • Posts: 285
  • Karma: +12/-3
  • -=Lex Generale=-
    • View Profile
Re: AI Empire v0.0.8; vastly better UI, small changes.
« Reply #27 on: October 05, 2010, 10:10:42 AM »
This should be officially added, it's just that handy. :D


Ius Naturale

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.0.10; updated for 1.0.6
« Reply #28 on: October 08, 2010, 03:29:22 AM »
Bump.  Updated for 1.0.6, recognizes fighters, AI default formation is FF_Wedge.

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.1.0; updated for 1.0.2.0
« Reply #29 on: October 19, 2010, 01:14:18 AM »
Bump.  Updated for 1.0.2.0

iceita

  • Sentient
  • **
  • Posts: 53
  • Karma: +5/-0
    • View Profile
Re: AI Empire v0.1.0; updated for 1.0.2.0
« Reply #30 on: October 19, 2010, 03:02:18 AM »
 ;) This is truly great!

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #31 on: October 19, 2010, 02:51:00 PM »
Updated to 0.1.1; you can now control much more of the AI (to the point where it should appear to do nothing at all if you turn everything off).  So that all of these new checks and other potential changes don't bother the NPC empires, a new player_ai.as is used instead of basic_ai.as

SRDominator

  • Sentient
  • **
  • Posts: 58
  • Karma: +4/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #32 on: October 24, 2010, 10:21:46 PM »
Is it possible to make the mod so that it is not enabled by default. I have already figured out how to prevent it from getting control of my Home world automatically and starting the governor automatically and have altered the mod accordingly. However, could there be an option were everything is disallowed from the beginning and you could select the things you want the AI to perform yourself. Example: I want to just at first have the AI deal with Treaties and nothing else so that is the only thing I select. Later maybe scouting, so I select that. From what I have tested thus far, it seems to be a great governor which is really what I want it to be. Not to control the entire game.

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #33 on: October 25, 2010, 12:38:10 AM »
Yes, and the place to do it is in Game Data\gui\ai_control.as , when the buttons are created.  Find AIControl.set() and add this as the last line:
Code: [Select]
set_enabled(false);

SRDominator

  • Sentient
  • **
  • Posts: 58
  • Karma: +4/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #34 on: October 25, 2010, 02:12:03 PM »
Yes, and the place to do it is in Game Data\gui\ai_control.as , when the buttons are created.  Find AIControl.set() and add this as the last line:
Code: [Select]
set_enabled(false);

Thank you very much for replying and providing the answer. Also, would it be alright to merge your mod with my own mods for public consumption?

ayrnieu

  • Distracted
  • ***
  • Posts: 383
  • Karma: +30/-8
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #35 on: October 25, 2010, 06:33:06 PM »
Yes, that's fine.

maximus84

  • Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #36 on: November 29, 2010, 01:50:55 PM »
Will this ever get an update? Did love the auto dock/undock functions of it...

vinc3nt

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #37 on: January 28, 2011, 03:10:02 PM »
Is there a chance you could update this Mod for v1.0.5.4? It is/was my favourate mod.

Maybe AI control of your empire could be included into a patch aswel :)

Thy Reaper

  • BMS Lead Developer
  • BMS Administrator
  • Hopeless
  • *
  • Posts: 3237
  • Karma: +397/-8
    • View Profile
    • Blind Mind Studios
Re: AI Empire v0.1.1; now with finer control
« Reply #38 on: January 28, 2011, 03:55:26 PM »
We did want to do something like this eventually.

vinc3nt

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #39 on: January 28, 2011, 04:08:28 PM »
We did want to do something like this eventually.

Good to hear you considered it.

This feature would make it easier to control large Empires (if you have many systems in a game), and you could think of the AI that control the different aspects of your empire as your personal advisors.

TheDarkOne

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #40 on: January 29, 2011, 11:51:10 AM »
for which version is this compatible with?

acantoni

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #41 on: January 31, 2011, 10:05:04 AM »
Quote
We did want to do something like this eventually.

Awesome! this was an excellent mode to start understanding the game mechanics and cant wait to have it implemented in the base game.

maximus84

  • Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #42 on: January 31, 2011, 11:25:46 PM »
One of the biggest problems I have with Star Ruler is the Dock/Undock Management...

I said it before and this time it is the same... I did come back to the game to play the new version and also the new Expanded Universe Mod. I did play some hours now and already stopped again (not because of the Mod, the EU Mod is great)... cause it is a big Pain in the Ass to manage Sector Defense and things like Carriers cause there is no "comfort" feature implemented for it... which makes it very time intensive and unfunny and just makes me stop playing.

It is like... You are the Emperor of a Huge Star Empire and have to give manual Dock/undock orders for every Carrier refitting its fighters, Carrier Fighter unload for attack (or Sector Defense) and after that you have to manually dock the fighters again and some other things... also involving Fighter Stations or the Ship Storage Bays of Planets.

I know that the Devs have something planned... I was told that since 1.0.2.2. I know they want to wait till they give the AI a full overhaul... but this can be a Loooong time till it is finished (my opinion). A much better way would be to take the small script part out of the Empire AI that docks your fighters everywhere where Ship Storage is available if they are idle, and undocks them when enemies enter the System. This could also be set to off/on via a button, like in this Empire AI Mod... it was so grand back when this mod did work... i miss it really. I am not a very good coder and have not the time to learn it at the moment... if I had the chance I would code it in myself.

This is not a perfect solution but it makes managing Fighters much much easier and it would be not THAT much of work for this big effect. It would also help with performance in big games, or in general, games where players build lots of smaller ships, cause they don't "idle" around in Space and use commands like "Fetch fuel" for example.

Foraven

  • Delusional
  • ****
  • Posts: 1591
  • Karma: +102/-6
  • Fear the gauss weapons!
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #43 on: January 31, 2011, 11:48:28 PM »
Hum... Maybe i can use the code i made for my AI to be used as a tool... Like a tool that call all fighters within range to dock or something like that. I never tried to make tools though, might be more complicated...
Maker of FRB mod.

Journier

  • Rather Die Standing, Than Live Kneeling
  • Star Ruler Beta Tester
  • Sentient
  • *
  • Posts: 132
  • Karma: +5/-2
  • Not a moderator.
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #44 on: February 01, 2011, 02:02:00 AM »
the ability to autocolonize all nearby systems i have to say would be fantastical.

I hate having to go to each system in larger galaxies and hit auto colonize
I got a killing desire, To spam mah bomber.

maximus84

  • Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #45 on: February 01, 2011, 02:15:03 AM »
I think the use of tools gets also too complicated when having a really big empire... I am speaking here of Games with 500 Systems (I usually play Games like this).

Just the AI Routine that automatically sends an order to idling fighters in a system so they have to dock somewhere, where capacity is empty (Stations/Carriers/Planets). And if there are enemies in sector, let them all undock automatically (and then the Star Ruler Stock AI jumps in and lets the Fighters attack Enemies in the sector)... plain and simple like the AI Empire did handle it.

It did not need anything clicking around a lot or something like that... it was something you had running in the background and you could concentrate on the stuff that really matters and not clicking buttons for "undock/dock" a lot.

This makes Fighters/Bombers more funny to play around with... at the moment I can not think of anybody using them a lot, cause they are a pain in the ass to handle... well or somebody lets them idle around in Space in the tenthousands and gets a performance hit ^^

Superking

  • Distracted
  • ***
  • Posts: 332
  • Karma: +27/-7
  • Ohhhh Jobi
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #46 on: February 01, 2011, 03:00:00 AM »
looks great, is this compatible with online multiplayer against the unmodded game?
I Make the Bread

Foraven

  • Delusional
  • ****
  • Posts: 1591
  • Karma: +102/-6
  • Fear the gauss weapons!
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #47 on: February 01, 2011, 09:00:33 AM »
Just the AI Routine that automatically sends an order to idling fighters in a system so they have to dock somewhere, where capacity is empty (Stations/Carriers/Planets). And if there are enemies in sector, let them all undock automatically (and then the Star Ruler Stock AI jumps in and lets the Fighters attack Enemies in the sector)... plain and simple like the AI Empire did handle it.

I guess it's the next features i should work on for my mod. I got a lot of AI routines done, but even i find it tedious to play my own mod when i have to do all that chore like docking fighters manually (or undocking them from planets). So i will add a bunch of tools based on the AI code i made...
Maker of FRB mod.

echo66

  • Distracted
  • ***
  • Posts: 309
  • Karma: +10/-10
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #48 on: February 01, 2011, 10:31:19 AM »
the ability to autocolonize all nearby systems i have to say would be fantastical.

I hate having to go to each system in larger galaxies and hit auto colonize

or we can have a colonization planning window like in MOO3 or Distant Worlds. It has already been done and it works. Just use the concept.  :)

krageon

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #49 on: March 15, 2011, 09:10:12 AM »
I'm having a stab at updating this - is it OK if I upload the new version here so someone with a fresh pair of eyes can look at it and tell me if something is going horribly wrong? I'm attempting to add in all the new AI bits and keep the old bits (or merge them in if they're obsolete enough), with a diff program and a lot of time, so things are probably getting horribly mangled and it may come out very broken.
However, this project is such that I'm willing to invest the time in updating (and subsequently fixing >.<) it; it's simply extremely nice :)

I've also gone through the files and I've removed the old bits that were included but not (I hope) strictly necessary (notably, the Script Data folder as I figured nothing was changed - I don't have access to an old version though, so I can't be sure).
It's currently picking personalities, but not actually using all of them.

tl;dr: Updating this, can I upload it for all to see?

Sid0035

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #50 on: March 16, 2011, 07:45:06 PM »
i would love to see this project revived i never got to try it out but it's what i been looking for as i have troble manigeing every thing in star ruler lol....

Thy Reaper

  • BMS Lead Developer
  • BMS Administrator
  • Hopeless
  • *
  • Posts: 3237
  • Karma: +397/-8
    • View Profile
    • Blind Mind Studios
Re: AI Empire v0.1.1; now with finer control
« Reply #51 on: March 16, 2011, 07:52:02 PM »
I sent a message to Ayrnieu, I don't know if he'll reply any time soon. I don't think he'd mind you releasing a modification, krageon, as long as you credit him.

krageon

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #52 on: March 17, 2011, 04:58:17 AM »
That's what I was thinking as well, but I always feel better if I've asked beforehand. I'm having a bit of a pause with the GUI bits so far though, and I'm beginning to think writing this from scratch using the new files would be a better (and less bug-prone) idea than essentially going over every game file with a diff program.

If I ever get through the GUI bits, I might actually do that.

Edit: I especially like the idea of a very non-intrusive way of adding the code (something like an include statement?), so that updating for a new version won't be such a pain. That  won't work for the AI itself, though (or at least I don't see how)
« Last Edit: March 17, 2011, 08:29:26 AM by krageon »

Thy Reaper

  • BMS Lead Developer
  • BMS Administrator
  • Hopeless
  • *
  • Posts: 3237
  • Karma: +397/-8
    • View Profile
    • Blind Mind Studios
Re: AI Empire v0.1.1; now with finer control
« Reply #53 on: March 17, 2011, 02:50:59 PM »
What do you mean for the non-intrusive inclusion?

You can import functions by declaration from modules, which is seen in many of the GUI code files. That allows the module to be edited separately, as long as it maintains the functions that are imported.

krageon

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #54 on: March 18, 2011, 08:44:46 AM »
That's exactly what I meant: Keeping the largest part of everything outside of anything else so updating things is not such a humongous pain.

More on that after I finish mountains of uni work >.<

DMZ

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #55 on: April 16, 2011, 03:22:47 PM »
Hou do i Install this mod and use it?

GGLucas

  • Dr. Evil
  • BMS Staff
  • Delusional
  • *
  • Posts: 1877
  • Karma: +300/-6
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #56 on: April 16, 2011, 03:25:52 PM »
This mod has not been updated for the latest version of star ruler, so you will not be able to use it, sorry.

Orophin

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
  • I am a rock. I am an island.
    • View Profile
    • STEAM
Re: AI Empire v0.1.1; now with finer control
« Reply #57 on: May 04, 2011, 07:29:58 PM »
Can someone update this for the new star ruler versions?
It's a great mod, useful for when I just want to get back and spectate or need some help and want my PC to be my advisor / take over.

Please? Pretty please?
Maybe make it an official feature, even?
"He was an avalanche from an unexpected quarter. He was a thunderbolt from a clear sky."

scarface2cz

  • Newbie
  • *
  • Posts: 8
  • Karma: +1/-0
    • View Profile
Re: AI Empire v0.1.1; now with finer control
« Reply #58 on: August 21, 2014, 07:26:04 PM »
Looks like i would have to update it my self. But i dont know a thing about modding star ruler and even more, AI wich will suplement player. any ideas where to look, what to learn?

seronis

  • Distracted
  • ***
  • Posts: 338
  • Karma: +25/-0
    • View Profile
    • Steam Profile Link
Re: AI Empire v0.1.1; now with finer control
« Reply #59 on: September 25, 2014, 07:09:31 PM »
Jyins Ministry mod does similar things and is compatible with current star ruler version. 

Alternately, for a 'place to start' just download this mod and read the code.  Look at the files it edits.  Look at the original star ruler files with the same name.  Look at the differences between the two.  A tool like  WinMerge makes this comparison trivial to see at a glance. I suggest using it.
Any code/mods I post on this site should be considered Public Domain. Borrow it, steal it, shred it into little pieces to your hearts content. I dont require credit but I appreciate bug fixes and suggestions.