Comments (14)
There's a "tile checkfilter" command, can you use that to check the filters?
from unciv.
I don't know how to use the console. Is there a guide for doing so?
from unciv.
https://yairm210.github.io/Unciv/Modders/Scenarios/#console
from unciv.
I've got the console open, but I can't make any sense of what I'm seeing. What should I be putting into the check, and what results should I be expecting?
Sorry if this is a dumb question.
from unciv.
tile checkfilter "non-[Fresh water]"
I'd guess (select the tile to test outside the console first), as that is the part declared to be a "tileFilter" in the Uniques dox. Needs quotes and proper casing to be meaningful. I'd bet it's the lowercase 'w' - or otherwise the parser not understanding nested brackets.
Seems to me "Fresh water" vs "Fresh Water" vs "non-[Fresh Water]" vs "non-fresh water" is still not handled well... But how else can we reliably differentiate a water source from "supports a consumer"?
from unciv.
There was a problem in the checkfilter command, now fixed
That aside, checked, your exact unique is working absolutely fine for me
I confuse
from unciv.
When you build the improvement with the "Provides [1] [Stuff] <in [non-[Fresh water]] tiles>"
unique in Fresh water tiles, does it still provide the stockpiled resource? Based on how I'm reading the unique, it shouldn't be doing that, but when I test it on my end, it's still doing exactly that. The "Stuff maker" makes the same stuff in Fresh water as it does in non-[Fresh water] and it's not supposed to be doing that.
from unciv.
Nope, it's working, and I even have a test to reproduce it
@Test
fun CityResourcesFromImprovementWithConditional() {
// given
val resource = game.createResource(UniqueType.CityResource.text)
val resourceImprovement = game.createTileImprovement("Provides [2] [${resource.name}] <in [non-[Fresh water]] tiles>")
game.getTile(1,1).addTerrainFeature("Oasis")
// when
game.getTile(1,1).setImprovement(resourceImprovement.name)
// then
val resourceAmountInCapital = city.getAvailableResourceAmount(resource.name)
assert(resourceAmountInCapital == 0)
}
from unciv.
And without the oasis it provides the resources
@Test
fun CityResourcesFromImprovementWithConditional() {
// given
val resource = game.createResource(UniqueType.CityResource.text)
val resourceImprovement = game.createTileImprovement("Provides [2] [${resource.name}] <in [non-[Fresh water]] tiles>")
// when
game.getTile(1,1).setImprovement(resourceImprovement.name)
// then
val resourceAmountInCapital = city.getAvailableResourceAmount(resource.name)
assert(resourceAmountInCapital == 2)
}
from unciv.
I don't know what's going on, but I swear that it's not working on my end. I'm using 4.11.19-patch1 and it's still not doing for me what it's doing for you.
Can someone else test this, and see if the problem is just on my machine?
from unciv.
I tried it out on Android, currently running version 4.12.0, to see if the problem exists there as well, and it looks like it is. I converted Stuff to a city-level resource to see if that would change anything, and I built one improvement right next to an oasis with the other next to no Fresh water. The result: still getting two Stuff in the city. You can check my code here: https://github.com/SpacedOutChicken/Lodo-s-testbed
I don't intend to be an annoying asshole, but I've been able to consistently get the bug on my phone and my PC, so let me ask: are you sure it's working on your end? Is there anything about the test you ran that might not catch the behavior we're looking for?
from unciv.
I'll test this more hermetically
I have no doubt that there is a real problem, I'll see how I can replicate - I think I'll use your mod and game save
from unciv.
Here are a pair of saved games you can use. One with the Stuff Maker next to a river, the other with a Stuff Maker next to a lake.
StuffMakerRiver.json
StuffMakerLakes.json
from unciv.
I don't intend to be an annoying asshole
Thanks! When I read that in my mail, I laughed out - "they seldom do" came to mind immediately. Sorry, it's not you, just the word combinations... Sorry again, won't debug myself unless y'all ask nicely, because I get lost in all that stockpile code, it's unfamiliar and I quickly scratch my scalp into a bloody mess "how is all that supposed to work???" :where's that rips-hair-out-not-that-i-have-any-left emoji: - Yair is the better person for this. By far. With strawberries on top.
from unciv.
Related Issues (20)
- Map editor crash placing any improvement HOT 1
- Possible typo: rigg HOT 3
- At turn ends, theres a bug to kick me out the game HOT 1
- Some typos HOT 1
- "Hidden from users" not hiding promotion uniques when displayed in Civilopedia or Nation picker screen HOT 1
- SOLVED: Crashes when putting tile improvement in map editor HOT 3
- NullPointerException on getDiplomacyManager() HOT 3
- Feature request: Add background music or onomatopoeia HOT 6
- "Suppress warning" modifier showing up on uniques in Civilopedia
- Cannot load save HOT 14
- Build lists on city screen load extremely slow HOT 2
- Gold duplication bug by disbanding already disbanded units HOT 1
- Destroyed civ can use espionage HOT 2
- "Removes removable features when built" doesn't remove terrain fetures when used in non-Great Improvement HOT 1
- Improvements for the map editor HOT 4
- River occuring in coast tiles HOT 4
- AI can declare war that was seemingly impossible to declare HOT 3
- Stuck and crushing on building items HOT 1
- "pick now" allows scheduling improvements without required techs HOT 6
- when war declared, units present on the rival territory due to open border trade should be pushed back HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unciv.