Galactic Empires (MP Sci-fi Scenario)

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Galactic Empires (MP Sci-fi Scenario)

Post by iceiceice » March 2nd, 2015, 7:18 pm

I think it would be a fair amount of work to make an AI for this, but it would be pretty nice and I think the mod is good enough that it deserves an AI.

If you wanted to make an AI just for this mod, I think the most direct way is that you need to take the default AI and modify it by making new candidate actions. Bare bones is probably like, it should know to recruit ships, it should know about beaming units up and down. I guess you'd need some minimum of tech tree / economy management. If you tweak the CA scores / ordering maybe you will get something that plays comparably to how the default wesnoth AI plays default wesnoth. So, maybe you can have GE training sessions, or a campaign.

I don't know if its possible to make new candidate actions only in lua, or if it requires C++ code. I should know that, but I don't sorry. :doh:

For inspiration regarding economic management, I think it might be a good idea to look at what FreeCiv does in their AIs and try to steal what ideas they had that worked?

---

FWIW I think it helps wesnoth generally more if we can make simulation AIs like crab wanted, because I think simulation AIs potentially will work not just for GE but for many different mods. Basically, if the AI has candidate actions that always check the menu options from any mod, then you won't need to write new C++ for things like "beam me up" "beam me down". But if you care mostly about GE then simulation AI is not the best route because its more work and there's no guarantee that it will work well.

mattsc
Posts: 1068
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: Galactic Empires (MP Sci-fi Scenario)

Post by mattsc » March 2nd, 2015, 8:14 pm

iceiceice wrote:I don't know if its possible to make new candidate actions only in lua, or if it requires C++ code
Yes, absolutely it's possible to add CAs using only Lua. If you want to see how, check out how the Micro AIs are set up, or some of the newer custom AI code in a couple of the mainline campaigns.

This sounds like it would be a fun project. Alas I'll have no time for things like this in the foreseeable future... :(

Slobodan93
Posts: 1
Joined: March 15th, 2015, 2:15 pm

Re: Galactic Empires (MP Sci-fi Scenario)

Post by Slobodan93 » March 15th, 2015, 2:49 pm

Hello ! Who is interest for a game ? :)

Rbuck
Posts: 56
Joined: February 22nd, 2013, 12:29 pm
Location: North Texas

Re: Galactic Empires (MP Sci-fi Scenario)

Post by Rbuck » March 20th, 2015, 9:47 pm

Hello,
Nice to see an update for this awesome mod!

That said, I noticed the Servicer image was one of mine.
I have no problem with that, but I think it's such an ugly piece of work that I did it over just now.
Hope this one looks better and will be used instead!

Also, as this isn't an art thread, if anyone wants a discussion/revisions/etc., send me a PM about it.

-- RBuck
Attachments
servicer.jpg
Now it's only half a ship.
servicer.jpg (8.15 KiB) Viewed 3915 times
A paintbrush is worth a thousand swords.
The average pen is equal to a sword, but a picture paints a thousand words.

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Galactic Empires (MP Sci-fi Scenario)

Post by iceiceice » March 20th, 2015, 11:30 pm

Hi,

I am glad that there is still interest in this awesome mod :)

Here's what I would suggesting about beaming / overcrowding:
  • If a planet is overcrowded, it should not be able to produce new units. I think that the food stores should not continue to stockpile either, it should simply max out at the food cap, and neither gain new food nor spawn a unit.
  • If soldiers try to land on an overcrowded planet they should simply kill whatever units are standing at their desired hexes when they beam down . This prevents stalemates from occurring. However maybe only soldiers should have this kill-to-make-space property.
  • That rule would have the consequence that, if you have 6 transports full of troopers say, you can simply wipe out the worker population of a maxed out planet in one turn just by beaming them down. However at least in current versions I don't think that this is imbalancing, as it is so costly and difficult to get many warriors.
  • An alternative rule would be that, you can only beam down on "flat" terrain, i.e. not on hills and mountains. So at least some of the workers can lead a guerrilla resistance from there, and maybe the HQ can spawn a few troopers there.
  • Edit: Another idea is that Soldiers should not be able to kill other soldiers to make space, so if you have sufficient density of soldiers you won't be overrun but then you aren't working the planet to full capacity.
Here are my thoughts about AI:

It's important to have clear goals.

The current default AI can actually somewhat play the mod -- if you start two AI opponents against eachother, they will in fact produce ships and try to attack eachother. They do not:
  • Make transporters, or beam units up and down. Therefore they also don't colonize planets.
  • They don't prioritize attacking planets correctly. They seem to like attacking neutral planets, but not the other AI's homeworld, so in fact the AI vs AI games don't end, because the winner doesn't deliver the coup de gras.
  • Manage worker economy or research at all.
The major barrier to making an AI for this afaik is the way that the mod is implemented. AI can easily call subroutines implemented in lua. It can also easily fire custom wml events, that use variables for inputs. However, in GE everything is pure WML and all of the special features are coded as WML menu items. Moreover, there are not just a few menu items, there are tons of menu items. I.e. beaming is coded as 6 different menu items, one for each possible position a transporter could be in with respect to a planet. The beaming down code is also copy pasted for each of the 5 different "slots" in the transporter. This all makes it very difficult (meaning, very tedious) to extend it or attach an AI to it.

In 1.13 it is slightly alleviated because there is a lua routine we added "wesnoth.fire_menu_item" which causes a menu item with a certain id to fire. In 1.12 we don't have that. We could rewrite the menu items so that they work by firing custom events, and then the AI could also fire these custom events when it wants a menu item to happen. But that's a nontrivial amount of work. If it were all up to me I would rewrite most of the "action logic" and economy details in lua, because it would be much simpler and easier to read and involve much less code duplication than the current implementation, but idk how that would go over with Bob.

I think the most realistic idea for 1.12 would be that, we don't try to make an AI for the standard GE-style game, but instead just make a survival game where hordes of enemy ships attack a galaxy using the standard AI logic. It's perhaps not necessary that the AI uses the same logic for beaming up and down as the players do -- it could be that if an AI transporter ever reaches a planet, then some internal AI code automatically spawns some invaders on that planet. The transporters could possibly be controlled by a micro-AI, or by candidate actions. It's possible that the AI invader spawn could also be written in WML as well, which would make it simpler for someone to implement this.

Another thing that's worth noting is that, I noticed a lot of console spam in 1.12 about the AI not being happy about selecting attacks that do zero damage, or that have 0-0 strikes. Bob used this for the "old"-style UI. I don't know / haven't decided if this is basically a bug in the AI, or if 0-0 attacks should just not be allowed or something. We might be able to patch in 1.12.2, who knows.

Conspicuously, I didn't discuss things at all like, the AI planning how to expand from planet to planet, and to take such economic considerations into account.

I think that actually it might be a better project to try to do that for a mod like Conquest- first. That mod has much more emphasis it seems on how to expand properly than necessarily on how to do combat properly. Conquest- doesn't have "beaming", although it does have boats which is sort of the same, but they aren't as fundamental to the game perhaps.

So that's sort of my thoughts, if/when I have to play with wesnoth AI, I think the most reasonable projects are either (1) GE survival mod (2) Primitive Conquest- AI.

Generous
Posts: 47
Joined: July 4th, 2011, 7:28 am

Re: Galactic Empires (MP Sci-fi Scenario)

Post by Generous » March 23rd, 2015, 8:51 pm

iceiceice wrote:Hi,
I am glad that there is still interest in this awesome mod :)
Here's what I would suggesting about beaming / overcrowding:
From your list, I already did (patch 1.1) a basic overcrowding protection (although didn't remove a stockpile of the food stores)
You may try to improve it further, and release in a form of patch as well - merge patches. And hope that Bob would find a spare minute for just copying your changes:
he still didn't review my patch despite I "spammed" him a lot :hmm:

By the way: its still OK if some players have my patch and some don't (just players with patch would have a small advantage regarding convenience)
however, if you would remove a food stockpile - later that can cause OOS between you and players without a patch, if other player would slowdown a food production.
So you would need to make all players to install your patch before a start of new game, to avoid the OOS problems

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Galactic Empires (MP Sci-fi Scenario)

Post by iceiceice » March 23rd, 2015, 10:25 pm

Hi Generous:

You are quite right about the OOS issue if the changes I suggest are added.

So one thing I noticed is that in 1.12, the overcrowding is a more severe problem, it results in units spilling out of he planet boundaries. There might have been a change to how [unstore_unit] works when there is no space, in the 1.10 -> 1.12 release cycle or something, it's hard to say. Possibly its a bug in wesnoth -- I'm not sure if we make any guarantees about what is supposed to happen or if a new flag was added. Don't have time to look at it personally at this moment.

So regarding patches -- I once found myself in a similar situation to you, what I did was I released an add-on titled "Unofficial Patch". http://forums.wesnoth.org/viewtopic.php ... al#p559822

If you are distributing a patch that people want to use, this is way more convenient for them than manual install. If the patch eventually gets merged, you can delete the patch add-on, or just put a note in the description saying that the patch got merged and the add-on is obsolete (that's what I did).

Lich_Lord
Posts: 104
Joined: December 23rd, 2009, 5:22 am

Re: Galactic Empires (MP Sci-fi Scenario)

Post by Lich_Lord » April 4th, 2015, 6:55 am

Hi, I've been playing a few games of GE recently and I've noticed two things.

1. Foodplant doesn't work. It displays in the HQ that it is +1 food, but when you end turn, the next turn you don't get the +1.

2. Is ford supposed to produce 1f,1g or just 1f. Right now it produces 1f, as the terrain tile says it should, but the trait 'work' says it should produce 1f,1g.

Overall I think its a good era.
Also one note about the factions. Iildari seems to be the weakest faction because their ships are significantly weaker and die easily.

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Galactic Empires (MP Sci-fi Scenario)

Post by iceiceice » April 4th, 2015, 11:45 pm

When we played 2 v 2 before, I think we thought the Ilidari fighter was too strong, because it dealt high electrical damage and was quite cost effective. But I think it got rebalanced, I didn't play on the new patch. Also the explorer was really good defensively as I remember b/c you can deny your opponents hexes that they need to attack.

Dwartha were also pretty strong as I remember. Blowing up planets is a good way to win, and Dwartha were quite good in a face-rush kind of strategy, because the Rover is pretty tanky and with leadership it has 9-3 damage, quite high because it's at sort of a breakpoint. It looks like they went up in price a bit.

I thought the Vendeeni were the weakest, their ships were too gimmicky and not cost effective enough. If they had a skirmishing unit to help them to penetrate and set up backstabs it would be better imo. It might have changed a lot with rebalance though.

With the ranged charger, and the backstab unit, and relatively frail ships, it seems like you want to rush with them, before it becomes impossible to set up a backstab. But their ships cost too much for that to ever work.

User avatar
doofus-01
Art Contributor
Posts: 3686
Joined: January 6th, 2008, 9:27 pm
Location: USA, the civilized part.

Re: Galactic Empires (MP Sci-fi Scenario)

Post by doofus-01 » April 5th, 2015, 4:16 am

Are you all using Windows? This doesn't work on Linux, at least not for me. I think it's because of things like this, in _main.cfg:

Code: Select all

#ifdef MULTIPLAYER   
        [binary_path]
                path=data/add-ons/Galactic_Empires
        [/binary_path]
        
        {./images} 
        {./terrain}
        {./sounds}
        {./music}
        {./units}
        {./files}
        {./races}
        {./abilities}
...
There were also some notices about whitespace in filenames.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Galactic Empires (MP Sci-fi Scenario)

Post by iceiceice » April 5th, 2015, 4:17 am

I was using linux, with version 1.10, a few months ago.
Edit: I also tested the 1.12 version maybe a month ago.

This is actually oddly relevant to some discussions on irc today, wherein shadowm tried to write unit tests for the new filesystem code and discovered some odd behavior.

Bob uses windows, and presumably it works on his machine for both 1.10 and 1.12? Or he wouldn't have uploaded it I think.

What errors did you get?

User avatar
doofus-01
Art Contributor
Posts: 3686
Joined: January 6th, 2008, 9:27 pm
Location: USA, the civilized part.

Re: Galactic Empires (MP Sci-fi Scenario)

Post by doofus-01 » April 5th, 2015, 6:28 am

iceiceice wrote:What errors did you get?

Code: Select all

error config: error reading usermade add-on '/home/lalala/.wesnoth1_12_1/data/add-ons/Galactic_Empires/_main.cfg'
error config: Found filename containing whitespace: 'Dark Intro_0.ogg' in included directory '/home/lalala/.wesnoth1_12_1/data/add-ons/Galactic_Empires/./music'.
The included symbol probably looks similar to './music'
at ~add-ons/Galactic_Empires/_main.cfg:-1
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects

User avatar
Eagle_11
Posts: 757
Joined: November 20th, 2013, 12:20 pm

Re: Galactic Empires (MP Sci-fi Scenario)

Post by Eagle_11 » April 5th, 2015, 10:40 am

The custom icon used in place of flag at the UI carried over to regular mp, with the solution being to remove the addon and then let wesnoth recache with f5 to revert it back to normal.

User avatar
Xara
Posts: 270
Joined: December 26th, 2014, 12:23 am
Location: Beijing

Re: Galactic Empires (MP Sci-fi Scenario)

Post by Xara » April 5th, 2015, 10:30 pm

Eagle_11 wrote:The custom icon used in place of flag at the UI carried over to regular mp, with the solution being to remove the addon and then let wesnoth recache with f5 to revert it back to normal.
I encountered the same problem as yours. But I asked some people else, and they said it didn't happen to them. Are you using 1.12.1?

BTW, would your Ageless Era Khalifate Image mask the default ones?
It pronounces Sha'ha, not Zara.

Feedback Thread of my Add-ons

User avatar
Rosencrantz
Posts: 7
Joined: March 28th, 2015, 2:55 pm
Location: Discordia

Re: Galactic Empires (MP Sci-fi Scenario)

Post by Rosencrantz » September 3rd, 2015, 7:25 pm

In response to Iceiceice's comment on the AI, I think a gradual progression system should be done, sort of like A New Land, where units that are sent after you increase in power. I will explain this system below.

Point 1: AI Behaviour
Should be modified so that the AI does not attack neutral planets, or place all the planets in a friendly side by default to AI. Another or alternate feature could be to have the AI prioritize colonizing/conquering planets based on it's size and terrain value to players; a green giant world that is not taken yet by anyone would be colonized by AI, but a small dust dwarf planet with abundant mountains or other gold producing terrain would be destroyed. AI would gradually at first seek to colonize planets, building transports and a few escorts, a ratio of 2 transports to 1 escort. Later on, as fleets begin to be deployed in large numbers, AI would create ships at a ratio of 5-6 battle vessels to 1 transport. AI would become increasingly aggressive to all planets after it starts to produce level 2 units for space. If the AI home planet is destroyed, they will rush the home planet of the vessel that deals the most damage or killing blow (at random choice) with any naval ships they have (congratulations from politicians at home or such leaked to them at last minute, transmitted off their home planet), as for ground forces, make them go to better terrain if possible on the planets they are on (guerilla resistance).

Point 2: AI Progress
The AI should have a set gold per turn and food per turn that rises to cap of 10 food per HQ, and 12 gold per HQ. It would start out at 6 per turn for food, 4 per turn for gold. 8 turns in, raises 1 each, 13 turns in, raises 1 each, 17 turns in, raises 2 each, 25 turns in, raises gold production per HQ to max., and food will have been maxed out. The ground units should all start at level 0, and 15 turns in, AI produces 1 type of level 1 unit, 24 turns in, 3 types of level 1 unit (and 1 level 2 unit possibly?), 33 turns in, produces all types of level 1 or 2 units, prioritizing level 2 units. This is for ground forces. Naval forces would have 2 types of ships besides transport initially, 13 turns in, all level 1 unit types, 21 turns in, 3 types of level 2 units, 30 turns in, all level 2 units and 1 type of level 3 unit, 40 turns in, all level 3 types, as well as 2 and 1, with priority going to level 2 units and level 3 units at a ratio of 5 level 2 units for every 2 level 3 units.

Point 3: How to deal with upgrades (to planets, ships, and other)
Simply add HP according to the unit after 20 turns, 1+ or 2+ moves according to units at 30 turns, and 2+ to 5+ damage for units according to type. Make the AI designate their strongest ship (in terms of health/damage) as their flagship after they can produce level 2 ships. This is for ground troops and/or ship units. For planets themselves, gold and food is discussed above, eliminate research from the equation (players will have to assume the AI gets better over time through research). Give their Home Planet double HP and 40% resist to all damage types after 32 turns, and after 41 turns, give their planet the ability to fight back all forms of attack, defensive only weapons. Give their planet a Regenerates 40 after 50 turns, oh and give their planet 6+ vision range after 20 turns. These upgrades only apply to the HOME Planet, not others.

Extra Point Not Related to above*
Bring on the Black Holes, Suns, and other units that were not shown in the maps! I was eager to destroy the suns, could not because there are none. Add a "Mechanical Planet" (like the death star from star wars) as a unit, give it a move rate of 1, 240 HP, and a defense only short range attack (laser cannons, missile launchers, etc) that hits for 9-10 and has swarm special, and give it a long range attack (super laser, rail cannon, etc) that is attack only, does a damage of 125-1, marksman special.

Final point: These are all suggestions! Please comment on them, as this thread is dead, and I am not a necromancer! Let's get some more GE games going!
Emperor Rosencrantz of Discordia, Chaos Clad in True Darkness

You have existed because I allow it, and you will end, because I demand it.
There can be no true Despair, without the poison of Hope.

Post Reply