"Simulation" ruleset - WORK IN PROGRESS

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
cazfi
Elite
Posts: 3093
Joined: Tue Jan 29, 2013 6:54 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by cazfi »

The MaxUnitsOnTile is implemented as simple comparison against tile's unit list size, so both "DoesntOccupyTile" and transported units count.
User avatar
Corbeau
Elite
Posts: 1292
Joined: Mon Jan 13, 2014 11:13 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Corbeau »

Yeah, this is not a perfect solution. It would be nice to have some diversification. Another option - best, in my opinion - would be to not allow units to ENTER the tile if stack limit is reached. But yes, transported units and air level should be excluded.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Dino the Dinosore »

Thanks, this is good to know. I updated the wiki page about Requirements so this is now documented.

Agree it would be nice to have something better, maybe it's worth filing an enhancement request? How about a new requirement "MaxCombatUnitsOnTile", which is same as "MaxUnitsOnTile", but does not count units with UnitClassFlag "DoesntOccupyTile" or with UnitFlag "NonMil", nor transported units.

Wondering how you could implement not allowing units to ENTER the tile if stack limit is reached - would need changes to basic game engine, or making unit moving an Action.
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Dino the Dinosore »

More questions about SIM30 ruleset -
1 The Simulation ruleset wiki page says "naval units cause no unhappiness when on a mission" - how is this implemented? I'm guessing on the server side, don't think it's possible from ruleset files.
2 Wiki page also says "You don’t need an embassy to make treaties" - same question, and I'm guessing same answer.
3 The Five Year Plan wonders - wondering about the numbers. The 1st costs 200 shields, so if you have 20 cities it starts paying off after 10 turns. But the 5th costs 1000 shields, so even with a huge empire of 40 cities it would take 25 turns to pay off, which doesn't seem worth it. Maybe make them all the same cost? Or have them increase shields by a percent (5-10%, say) so the benefit would compound?
cazfi
Elite
Posts: 3093
Joined: Tue Jan 29, 2013 6:54 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by cazfi »

Dino the Dinosore wrote:or making unit moving an Action.
It is in 3.1. Haven't checked if disallowing movement by target tile's unit count would work.
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Dino the Dinosore »

Playing with SIM30 some more - I really like the resort on the mountain idea, but the code in SIM30 terrain.ruleset doesn't work. The line
causes = "Irrigation"
conflicts with line in [terrain_mountains]
irrigation_result = "no"
resulting in the UI not showing the Build Irrigation menu item, and there's no way to build the resort. The SIM26 & SIM25 lack the "causes =" line, which makes me wonder if there is a default value for "causes =", and whether this ever worked. I have gotten my own version to work by making Resort a base, thus -

Code: Select all

[extraui]
ui_name_base_fortress="?gui_type:Build Fort/Fortress/Buoy/Resort"
...
[extra_resort]
name           = _("Resort")
category       = "Infra"
causes         = "Base"
graphic        = "base.resort"
graphic_alt    = "base.buoy"
activity_gfx   = "unit.resort"
act_gfx_alt    = "unit.buoy"
rmact_gfx      = "None"
rmact_gfx_alt  = "-"
reqs           =
    { "type", "name", "range", "present"
      "Tech", "Explosives", "Player", TRUE
      "Terrain", "Mountains", "Local", TRUE
      "Extra", "Road", "Local", TRUE
      "UnitType", "Settlers", "Local", TRUE
      "CityTile", "Center", "Local", FALSE
    }
build_time     = 5
border_sq      = 0
vision_main_sq = 4
helptext       = _("\
Resorts on mountains are used for rest and recreation, \
resulting in +2 trade. Use the Combat menu to issue the order to build a Resort.\
")
...
[base_resort]
extra          = "Resort"
gui_type       = "Fortress"
...
[effect_mountain_resort]
type    = "Output_Add_Tile"
value   = 2
reqs    =
{	"type", "name", "range"
	"Extra", "Resort", "Local"
	"OutputType", "Trade", "Local"
}	

I added Road requirement and reduced build_time, and increased trade benefit to +2.
The wiki page says -
Researching Explosives makes it possible to build Resorts on Hills and Mountains, resulting in +2 Trade
but in the SIM30 code it is not possible to build on Hills and it's just +1 Trade.
User avatar
Corbeau
Elite
Posts: 1292
Joined: Mon Jan 13, 2014 11:13 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Corbeau »

Huh, thanks! I'll check all this when I get the time! I have a bunch of notes that need addressing, this one goes on it, too!
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Dino the Dinosore »

I've added the resort terrain alteration, and the Food Market, Grocery Store, and Shopping Mall buildings to the ruleset I'm working on. Not satisfied with using just the graphic_alt graphics, I spent some time digging thru wikimedia looking for public domain images, and made some graphics files which I can share. Need to also update bases.spec (add 0, 6, "base.resort_mg"), buildings-large.spec (add b.food_market, b.grocery_store, and b.shopping_mall) and the .tilespec (add base.resort) to use them.
Attachments
shopping_mall.png
shopping_mall.png (10.29 KiB) Viewed 59452 times
grocery_store.png
grocery_store.png (12.96 KiB) Viewed 59452 times
food_market.png
food_market.png (12.73 KiB) Viewed 59452 times
bases.png
User avatar
Corbeau
Elite
Posts: 1292
Joined: Mon Jan 13, 2014 11:13 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Corbeau »

Image
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
User avatar
Corbeau
Elite
Posts: 1292
Joined: Mon Jan 13, 2014 11:13 pm

Re: "Simulation" ruleset - WORK IN PROGRESS

Post by Corbeau »

After a looong intense period in work-related things, I have finally returned to this. I have more or less finished fixing some bugs and implemented some organic updates, will now work on new features and ideas and suggestions. The ruleset on the GitHub isn't updated yet, but I expect to do it in a few days and, after that, with some testing, plan to start a new Sim game within one month. So if you're interested, watch this space. (The progress can be monitored in the first post of this thread, but it's a mess so maybe it's not worth it too much :)
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Post Reply