Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modding requests #3242

Open
yairm210 opened this issue Oct 7, 2020 · 489 comments
Open

Modding requests #3242

yairm210 opened this issue Oct 7, 2020 · 489 comments
Labels

Comments

@yairm210
Copy link
Owner

yairm210 commented Oct 7, 2020

There have been a lot of various requests to extend the modding in various ways.
Usually they're from one person, and have very little effect on the general playerbase, and they're kind of clogging up the issues.

So this is an issue to consolidate all those requests, as comments to this issue.

@GoldenBronze
Copy link
Contributor

  1. Making roads and railroads modifyable - currently, these seem hardcoded. Putting their parameters in TileResources.json and allowing Unciv to handle modded roads and railroads would be extremely beneficial for, say, a mod with several kinds of roads.

When described in the json, roads and railroads could have parameters like "Double movement rate" and "Triple movement rate upon researching [ ]". There's lots of opportunity here.

  1. Allowing terrain-tied resources - currently, resources stay the same if a terrain feature (most commonly Forest and Jungle) is removed. I'd like it if it were possible to set a (in TileResources.json) a resource such that it disappears if the terrain feature it occurs on is removed. Admittedly, this is not present in Civ 5 itself, but it would be extremely helpful to modders like me in putting resources like Cedarwood: I mean, you can't get cedarwood from a tile you've deforested, after all!

A unique for this, maybe "Is removed by [Remove Forest]".

  1. Selective improvement construction: currently, the Roman Legion has the "Can construct roads" unique. It would be great if this unique could be generalised so that it works with any improvement: not only would it make it easy to add the Legion's other ability of constructing forts, it would also be extremely fruitful for modders.

"Can construct [Road], [Fort]".

  1. Tile improvements unique to units: I'd like to be able to define a modded tile improvement as being unique to a non-Worker unit, so that the Worker can't build it.

Maybe a "UniquetoUnit" parameter inside the "uniques": in TileImprovents.json or something similar? This would also allow Oil Wells to be restricted to Workers and Offshore Platforms to be restricted to Work Boats, as in Civ 5, assuming that the "improvement": parameter in TileResources.json can handle more than one improvement.

@GoldenBronze
Copy link
Contributor

  1. Allow terrains, terrain features and resources to be restricted to spawn only on River tiles.

A unique to the effect of "Must be on [River]" or something similar would be great, especially for futureproofing Unciv for Civ 6 (if you eber get to that), and also for modding.

@ravignir
Copy link
Contributor

Here are some ideas for uniques.

"Can not be sold" - for buildings.

"Unlocks at [Era name]" - for buildings and units and improvements (already implemented for Policies).

"Food required for population growth +/- [x]%" - as nation and policy unique (also called civ-wide).

@ravignir
Copy link
Contributor

Just a clarification of what i've meant with the last idea.
Capture+_2020-10-20-16-45-14(1)
A way to interact with this parameter. Maybe call it "City growth rate +/-[value]%"

@ravignir
Copy link
Contributor

ravignir commented Nov 9, 2020

Another suggestions;
Modding unique that makes other policy trees non pickable:
i.e If i pick Piety, I can't pick Rationalism and vice versa;

"Unlocks at [era]" unique for buildings, units;

@Caballero-Arepa
Copy link
Contributor

This is already mentioned on the first comment but: A unique that allows units to build specific tile improvements, like "Can construct [Fort]".
Currently there is only: "can build improvements on tiles" and " Can construct Roads".

@Caballero-Arepa
Copy link
Contributor

A unique that let's you do canals for improvements or tiles. With this, we could make canals (like, suez canal) or make navigable rivers; or even the opposite, as bridges (like the one that ties scotland and ireland).
I imagine the unique could be as: "Acts as [Water]"
How it would is by allowing both land and water units move in such tile normally.

The problem I see with it is that AI would be very dumb to use it but what we care is for the player.

@AdityaMH
Copy link
Contributor

AdityaMH commented Jul 7, 2021

Any wiki tutorial how to mod m̶u̶s̶i̶c̶ sound?

@Caballero-Arepa
Copy link
Contributor

A unique for polices that gives you a free policy, but from a specific tree.

@ajustsomebody
Copy link
Contributor

allow tile filter to contain more than one tile

f.i allow this to work
"Must be next to [Desert]", "[+1 Food, +1 Production, +1 Gold] from [Desert] tiles without [Flood plains, Oasis, Hill] [in this city]"

this is my attempt to only make plain desert tiles get petra bonuses but it completely broke so it gives bonuses to all

@ajustsomebody
Copy link
Contributor

more than 1 techs required for a building
techrequired: "currency, sailing"

@ajustsomebody
Copy link
Contributor

add a property to improvements that is can be build by [unitFilter] so the mods can add more than 1 types of workers. this however should only be the case for worker units that are able to open up select improvements to build window rather than something like legions that have an ability to build only roads

@xlenstra
Copy link
Collaborator

xlenstra commented Aug 2, 2021

add a property to improvements that is can be build by [unitFilter] so the mods can add more than 1 types of workers. this however should only be the case for worker units that are able to open up select improvements to build window rather than something like legions that have an ability to build only roads

This is already implemented the other way around, as you can have the "Can build [improvementFilter] improvements" uniques for units, so this can allow building specific improvements or groups of improvements

@ajustsomebody
Copy link
Contributor

add a property to improvements that is can be build by [unitFilter] so the mods can add more than 1 types of workers. this however should only be the case for worker units that are able to open up select improvements to build window rather than something like legions that have an ability to build only roads

This is already implemented the other way around, as you can have the "Can build [improvementFilter] improvements" uniques for units, so this can allow building specific improvements or groups of improvements

is there a distinction between units than can open up build improvement screen and others? also do you need to do something like this "can build [mine]" "can build [farm] etc or can it directly do can build "[mine,farm,quarry]" etc.

@xlenstra
Copy link
Collaborator

xlenstra commented Aug 3, 2021

add a property to improvements that is can be build by [unitFilter] so the mods can add more than 1 types of workers. this however should only be the case for worker units that are able to open up select improvements to build window rather than something like legions that have an ability to build only roads

This is already implemented the other way around, as you can have the "Can build [improvementFilter] improvements" uniques for units, so this can allow building specific improvements or groups of improvements

is there a distinction between units than can open up build improvement screen and others? also do you need to do something like this "can build [mine]" "can build [farm] etc or can it directly do can build "[mine,farm,quarry]" etc.

Only units that have have the "Can build []" unique can open the "build improvement"-screen. Uniques don't support comma separation, so you need a different unique for each imrpovement

@ajustsomebody
Copy link
Contributor

comma seperation for uniques

@ajustsomebody
Copy link
Contributor

two uniquesets for anything that supports uniques, one for with religion on and one with religion off

like:
monastery(r on) = 2 culture 2 faith from incense/wine
monastery(r off) = 2 culture from incense/wine

or we can just make the game ignore anything about faith or gprop points when religion is disabled

@ajustsomebody
Copy link
Contributor

being able to put decimals in bonuses for instance.

[+0.50 Food] for [tundra] tiles for each adjacent [mountain] tiles [in all cities]
[-0.16 Food] for [tundra] tiles for each adjacent [snow] tiles without [mountain] tiles

for instance when calculating this you do math on each other and remove the decimal at the end of the calculation (or just allow decimals in [stats])
(0.50+0.50+0.50) - (0.32) which is 1.18.
if the value is less than 0 you round it down normally (0 if <50 1 if >50) if it is over 1 just remove the decimals and if it is 1.82 something round it to 2

@ajustsomebody
Copy link
Contributor

ajustsomebody commented Aug 8, 2021

add an option to hide certain uniques from showing up in descriptions like
uniques: "[HIDE] [+1 Gold, +1 Science] from every [grassland] with [jungle]", "[does something that dhows up in description]"

something something:
400Production
womething that shows up in description

@xlenstra
Copy link
Collaborator

xlenstra commented Aug 8, 2021

Use the replacementTextForUniques parameter, most major things have that

@GeneralWadaling
Copy link
Contributor

Cannot embark to completely forbid certain units from embarking, or act as an extra layer of prerequisite for embarking when work with conditionals

@AceHank
Copy link

AceHank commented Jan 28, 2025

I am once again requesting some uniques:

  1. <upon losing [stockpiled]> & <upon gaining [stockpiled]>, (or consuming/providing??)
  2. <upon losing a [baseUnitFilter] unit>
  3. Also if possible, make UnitActionModifier not exclusive to Unit Action. For example:
  • [This Unit] heals [50] HP <upon losing at least [1] HP in a single attack> <when below [30] HP> <costs [+100 Gold] stats>
  • [Target Unit] gains the [Cursed] promotion <upon damaging a [All] unit> <once>, etc

For additional info, I have workaround for most of my use case on no. 3, so it's not really a need for me, but it would be much easier if I can just slap Modifiers to them.

EDIT: Oh, also workaround on no. 2 as well, but, would be easier if that's available.

Thank you very much!

@chenxing61
Copy link
Contributor

add specialist type like scientists and artists to populationfilter

@AceHank
Copy link

AceHank commented Feb 2, 2025

Requesting <when at war with [civFilter] Civilization> and <when not at war with [civFilter] Civilization>
Or at least nationFilter, if civFilter is impossible/harder to implement.

Reason being, I want the already existing <when at war> and the inverse to be less abuseable by adding Major Civilization option.
As well as so we can have more use to Civs with tags, like "Undead" for example, we can make a unique <when at war with [Undead] Civilization>.

Thank you very much!

@AceHank
Copy link

AceHank commented Feb 5, 2025

I apologize for spamming the request thread. And I thank you as always for the help.

Requesting Destroyed when Pillaged for Improvement Uniques.
Destroyed as in removed from map, so the tile is now without any improvement.

Thank you!

@RealBamboolord
Copy link
Contributor

I really need that one too

@AceHank
Copy link

AceHank commented Feb 10, 2025

Once again I apologize for spamming the thread.

Requesting: <for every adjacent [unitFilter]> and <with [amount] to [amount] neighboring [unitFilter] tiles>.
As we already have the tileFilter version of them, I think it would be great to have the unitFilter variant as well.

Thank you very much!

EDIT: Oh and while I'm at it, I also request <within [amount] tiles of a [unitFilter]>

@RealBamboolord
Copy link
Contributor

RealBamboolord commented Feb 14, 2025

I am baffled that this hasn't been added yet:
a "Can not be constructed by [unitFilter] units" unique for tile improvements to make them not buildable by workers for example, but buildable by other units
Note: Currently this can kind of be achieved with "Can build [improvement] improvements at a [-100]% rate" , although that would probably confuse the Ai

@RealBamboolord
Copy link
Contributor

RealBamboolord commented Feb 14, 2025

Also a <gaining the [promotion] promotion/status> unitActionModifier, similar to the existing <removing the [promotion] promotion/status>

@Phanpy100
Copy link

Posted my reasoning for these on the Discord but I thought I'd also log in to my old github and request these uniques here:

A Transfer city to [NationFilter] would be nice, I was planning to use this to change severely unhappy cities to an unplayable civ essentially acting the same as the barbarians.

In addition to that I would really appreciate these two to be added onto the possible countables:

Every Copy of [ResourceFilter] on Map
Every Copy of [ResourceFilter] owned by [PlayerFilter] combined

Lastly, I would appreciate being able to multiply stockpiled resources for calculation purposes (You can do this already but it requires a second resource purely for calculations) :)

Thanks to all the amazing people working on this open source project btw, wish I had the time to contribute myself.

  • Kind Regards, Fanny

@RealBamboolord
Copy link
Contributor

RealBamboolord commented Feb 19, 2025

A Transfer city to [NationFilter] would be nice, I was planning to use this to change severely unhappy cities to an unplayable civ essentially acting the same as the barbarians.

Small comment from my side: This has to be [Nation] not [NationFilter] as the latter is ambigious

@AceHank
Copy link

AceHank commented Feb 19, 2025

Requesting the already existing Not shown on world screen, to be not shown anywhere on screen (Or a new completely new unique is also fine!).

My mod has plenty of custom resources used for counters, and despite being Not shown on world screen, they are still shown in the overview tab. Even when a Civ is not supposed to have them.

Image

And if it happens to be new unique, this should also accept conditionals, currently Not shown on world screen <for [non-[CivName]] Civilizations> works perfectly, except the stated overview tab.

Thank you very much!

@AceHank
Copy link

AceHank commented Feb 20, 2025

I am sorry for the double comment, but I feel like this need to be in a separate comment because of the difference in content, so forgive me. I've stated it in Discord, and a Dev is already responding, but I feel like it would be better to request it formally in here.

Requesting for:

  1. A new feature in UnitPromotions.json that we may use to indicate between positive and negative statuses
  2. Make it so we can also see what a status does when clicked (like when we click a unit's promotion)

Reasoning:

  1. In my mod, I have a lot of status effects, positive and negative. And because I want to make it so the player may instantly know whether a status is good or bad. Example:

Image
In the picture above, players may not know what those statuses mean, they will need to navigate through the civilopedia, with only the statuses' icons as clue. This will be mitigated if the player may at least know whether a status is positive or negative.

So my suggestion currently, is to add a new structure for promotions, something like:
"status": "Neutral", means no extra icons in top right (this should be default the value)
"status": "Positive", means an up facing arrow in top right corner
"status": "Negative", means an down facing arrow in top right corner

Image
Picture above is to provide what my suggestion would look like (ignores the red color on the arrow). And also, contrary to the provided image, I believe it would be better if the arrows were just up/down triangle 🔽 🔼

  1. If a player may easily access these statuses without going to Civilopedia, we might not even need No. 1, but of course, if 1. exist, that'd be great nonetheless!

Thank you very much! And I apologize for the double-post!

@PLynx01
Copy link
Contributor

PLynx01 commented Feb 21, 2025

Can we add TriggerCondition countable uniques?

They will be useful for triggering events. Something like this:

Triggers a [Overflowing Treasury] event <When [Gold] crosses above [20000]>

That means if civilization's gold reserves becomes higher than 20000 the event will trigger.

@AutumnPizazz
Copy link
Contributor

我们可以添加 TriggerCondition 可计数的唯一值吗?

它们对于触发事件很有用。像这样:

Triggers a [Overflowing Treasury] event <When [Gold] crosses above [20000]>

这意味着如果文明的黄金储备高于 20000,就会触发该事件。

You can get it by

Triggers a [Overflowing Treasury] event <when above [20000] [Gold]> <upon turn start>

@PLynx01
Copy link
Contributor

PLynx01 commented Feb 23, 2025

我们可以添加 TriggerCondition 可计数的唯一值吗?

它们对于触发事件很有用。像这样:

Triggers a [Overflowing Treasury] event <When [Gold] crosses above [20000]>

这意味着如果文明的黄金储备高于 20000,就会触发该事件。

You can get it by

Triggers a [Overflowing Treasury] event <when above [20000] [Gold]> <upon turn start>

You misunderstood me

This event is intended to be triggered at turn when gold is crossing above 20000.

Let's say, when gold grows from 19900 to 20100, then event gets triggered.

But if it grows from 25000 to 25200 it should not be triggered.

@AceHank
Copy link

AceHank commented Feb 24, 2025

Requesting to change tech into techFilter from theese conditionals:

  1. <after discovering [tech]>
  2. <before discovering [tech]>
  3. <while researching [tech]>

We already have working techFilter in <upon discovering [techFilter] technology>, so I reckon it's time for those conditionals to accepts techFilter and not binded to tech's name.

Thank you very much!

EDIT: For context, I need it because of techs with tag(s).
The screenshot below could easily be resolved in one line with techFilter, as Magitech is a tag for certain technologies.
Image

@Calandiel
Copy link

It'd be nice to have a way to filter for tiles that are worked by a citizen. For example, to have a way to provide resources with a tile improvement only when a citizen is assigned to the tile.

I imagine you could extend the existing tileFilter implementation and add something along the lines of worked to the existing unimproved and improved filters.

I could look into implementing it myself if someone could point me to the relevant files.

@AutumnPizazz
Copy link
Contributor

@PLynx01 Sorry. And we could still use uniques today to achieve it but hurting performance.
Add Provides [1] [resourceCounter] <hidden from users> in your event. Then use Triggers a [Overflowing Treasury] event <when above [20000] [Gold]> <upon turn start> <when [resourceCounter] is less than [1]>

@Calandiel
Copy link

I noticed that the global unique Provides [amount] [resource] doesn't apply to specialists. Would it be possible to extend it to them?

@RealBamboolord
Copy link
Contributor

RealBamboolord commented Mar 4, 2025

I noticed that the global unique Provides [amount] [resource] doesn't apply to specialists. Would it be possible to extend it to them?

<in cities with at least [amount] [populationFilter]>
<in cities with [amount] [populationFilter]>
<in cities with between [amount] and [amount] [populationFilter]>
Those conditionals attached to a resource providing unique make for a decent workaround. You may want to add and provide a better wording with a comment

@RealBamboolord
Copy link
Contributor

RealBamboolord commented Mar 4, 2025

"Starts with the [status] status with a duration of [amount] turns"
As a unit unique that gives the unit the specified status when it is constructed, bought or gained for free through any means. Works like a free promotion, with the difference of not gaining it every turn but only once.
Alternatively a "<upon appearing>" or "<upon being built>" or smth like a "<upon being built/bought/gained>" unit trigger condition would also work for me

@yairm210
Copy link
Owner Author

yairm210 commented Mar 5, 2025

"Starts with the [status] status with a duration of [amount] turns" As a unit unique that gives the unit the specified status when it is constructed, bought or gained for free through any means. Works like a free promotion, with the difference of not gaining it every turn but only once. Alternatively a "<upon appearing>" or "<upon being built>" or smth like a "<upon being built/bought/gained>" unit trigger condition would also work for me

All units when built trigger all their uniques so you don't even need a trigger, should work today

@Katnjia
Copy link

Katnjia commented Mar 6, 2025

Support for non-square tiles

Image

Image
(with Grassland tiles filled in. The textures are centered to fit a square tile)

Image
(96x48 tile example)

I'd like to make an isometric tileset. However this requires the non-square tiles and currently afaik this isn't supported. A way to set tile offset / specify a tile mask would be ideal.
In FreeCiv for example, this is done by having two masks; one for directions each face of the tile corresponds to, and an alpha-mask.

Image
Image
(FreeCiv also has an third blend mask to blend the edges of tiles)

@hackedpassword
Copy link

Support for non-square tiles

First, this kind of request demands a feature request issue post, way too involved for 3242.

Next, hey I'm just the guy to comment on tile shape modding! See Ultima V tileset mod (on discord and github) for an example of synthetically using square tiles. Maybe this could inspire an isometric vis-hack like my mod has done with capturing retro gaming.

Last, for this response (again this isn't the right place for the discussion), the entirety of pathfinding and AI is built in a hex grid world. Support for 4-poly (square) or non-hex is about as likely as moving to unreal engine. Isometric view sounds great, but you'll have to engineer a modhack to bring that idea to life.

@Katnjia
Copy link

Katnjia commented Mar 6, 2025

re: hackedpassword

First, this kind of request demands a feature request issue post, way too involved for 3242.

Sure, I can make it a feature request; I was under the assumption this was the right thread for it.

Next, hey I'm just the guy to comment on tile shape modding! See Ultima V tileset mod (on discord and github) for an example of synthetically using square tiles. Maybe this could inspire an isometric vis-hack like my mod has done with capturing retro gaming.

I'll take a look, thanks.

Last, for this response (again this isn't the right place for the discussion), the entirety of pathfinding and AI is built in a hex grid world. Support for 4-poly (square) or non-hex is about as likely as moving to unreal engine. Isometric view sounds great, but you'll have to engineer a modhack to bring that idea to life.

The last images was just example implementations from FreeCiv; it indeed only supports 4 directions, and "de-hexing" unciv was not what I was suggesting.

@AceHank
Copy link

AceHank commented Mar 9, 2025

Requesting Not shown on world screen to also hide promotions and statuses from world screen.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests