Thanks, registered there, but awaiting for moderator approval.
Thanks. Yes modding is not very easy but for me the key is understand what you can make with a game. I do not try very difficult things in a begining with a new game and if I want some big, I start first with some smaller. I say it because many people start their mods without understand what the game offer and what you can make easily with your skills. By these reasons, I could make many mods. Of course, I have been modding games more of 15 years, 2D and 3D games, I am not god but I have enough experience.
That's quite an experience
I was trying to make the game as moddable as possible, but as I am not a modder myself, I cannot always predict what can be critical and what not.
What I tried to do in general, is to write a hardcoded part in a way it operates when possible with "abstract instances" instead of some hardcoded things.
For example, the resources in the game (like food, production, science points, etc) are not fixed, but instead the game operates with general "classes of resources" that behaves differently - like Mineral class can be stored in deposits and can be distributed empire-wise, Production class cannot be stored and is not distributed, Science class cannot be stored, but can be distributed, etc. And AI operates in these general terms, so adding new resource of any type would not break it's logic.
Buildings are also not fixed, so AI cannot "build Factory and Iron mine", but instead it should check balance of "resource #0", then search for a building that can produce this "resource #0", check if this building can be built, queue any supporting buildings (like to create "building #1" you need first to create "building #2", that allows for growing population required by the "building #1"), etc.
The same for spaceships - as there is a ship designer in the game and equipment, ship classes, science, etc is not fixed and can be anything, the AI operates in abstract "Doctrines". These Doctrines are a kind of guidelines for AI - what type of designs try to build when and for what ship roles, how to combine fleets from these designs for specific tasks, etc. And this is tied to the overall science progress, as at some point of time one fleet composition or ship design is better, but then it can be completely different.
And Doctrines can be edited, as they are a simple text files.
The difficult part is that I do not use XML - I do not like it since it's appearance

So everything is in plain text files with their own syntax.
Like this:
Code: Select all
ID "HydroponicFarm"
Icon "images/ve/buildings/hydropon_plantation.png"
Info "HydroponicFarm"
MaxCountByDefault 50
Produces Food 1000.000000
WorkersRequired 750
AIValue 0.200000
Requires Prod 75.000000
RequiredTech "SCBLDHYDROP"
ProdAmountModTech "HIDDEN_HYDROPONIC_FARM_BOOSTER" 1.2500000
For most complicated parts I use a specially designed language.
It looks like this:
Code: Select all
on event "ORBITAL STRUCTURES DESTROYED "+str(this.raceID) callm this.OfferTribute(EventParmInt) lazy always
delete when "KILLED RACE "+str(this.raceID) or "ORBITAL STRUCTURES DOUBLE CHECK "+str(this.raceID)
or like this:
Code: Select all
phrase SeedContainersDefined(TotalAmount, Percent, FromID, ToID)
local ThisAmount = call DivRound(TotalAmount*Percent, 100)
local i
for (i = 0, i < ThisAmount, i++)
local idx = call RND(1, HandleList2 SIZE + 1)
local StarHandle = HandleList2 Get (idx)
if (Yes==call UFIsNoOnesStar(StarHandle, Yes))
local ThisID = call RND(FromID, ToID + 1)
call UFAddSpecialContaner(StarHandle, call GetContainerTypeByContent(ThisID), ThisID, call GetContainerAmountByID(ThisID))
else
i--
end if
end for
end phrase
About your game, It looks very appetizing. Your game looks as a very good game for be followed the next months.
Thanks! If you need any help, or you have any ideas of what can make the live of a modder easier, I am here...