Ingame Editor

Hi DonQuiche
Thank you for your mod, is amazing!

But I had one problem. The image of natural wonders fails to show on the map when I try to add some natural wonders, the image of terrain stays the same as before ; not sure it is a bug or I did not do it correctly. I am using the latest version.

save the game and then reload it should appear.
 
Troubleshooting and bug reporting
Test without any other mod
Although IGE should be compatible with all mods, some of them may add unexpected, strange, or malformed data. Nothing I can't fix though, as long as you can identify the culprit.
* First test IGE without any other mod loaded (use a fresh new game).
* Then enable both IGE and another mod, in order to test addons one by one.

If you found the culprit, then please report it in this thread, along with the error message if you ot one. I will quickly make IGE compatible with your beloved addon.

I am using the "A Civ of Ice and Fire v2" Mod and can not use IGE with it. I have attached the lua.log, it fails upon load. IGE works fine without the mod loaded.
 

Attachments

Hello Magicalyak and thanks for the report.

I found the problem, it appears that this mod specified a non-existing trait for at least one minor civ. In the game it causes this civ to not have any icon. It also happened to crash civ5 and my PC (superF4 wasn't working) the second time I looked at that civ. I suggest you report the problem to the author.

Meanwhile I attached a version of IGE resistant against that flaw (v22 - beta3).

PS : No final v22, sorry, I want to add something before I release it and I don't have time right now.
 

Attachments

Bug report.

With only IGE v21 loaded, no previous versions installed before. Cleared game cache. Started Civ5. Started a new map with all defaults but Duel map to shorten map generation and load time.

Steps to reproduce the bug:

1. Settle on river-grassland-hill (2/2/1).
First pop is now working on River-grassland-stone (2/1/1).
City productivity at 2/6/5. (Palace provides 0/3/3.)
2. Start Monument (0/40).
3. IGE farm the stone. Plot becomes 3/1/1.
City productivity at 2/7/5. (But it should be 5/6/5!)
Farming the stone should add 1 food, but it added 1 production instead.
4. NEXT TURN.
Monument at 7/40, city productivity at 2/7/5.
So the error is carried through.
5. Now IGE remove the farm. Plot returns to 2/1/1.
City productivity is at 1/8/5.
So removing the farm, which should do -1F, actually did -1F+1P.
Now manually remove (unemploy) the pop from the unimproved stone.
City productivity shows -1/8/4.
The city plot still shows 2/2/1, yet is only producing 1 food,
while the farming and unfarming of the stone added 1 production each time.
6. Save game. (Alexander BC-3960)
7. Exit Civ5.

Attached is the savegame and Lua.log at this point.
Note the Log has two map generations, because the first time I started Civ5,
I forgot to go into Mods and started a map in vanilla Single Player.
I then exited to main menu and went into mods for the actual bug.

The bug seems to occur on worked tiles only.
The same experiment can be done using a Quarry in place of the farm,
in which case the food yields won't bug, but hammer yield keeps accumulating.
In short, we could, in one turn, create a city with as much hammers as we want.
Just keep building and removing the Quarry on the worked stone plot with IGE.
 

Attachments

Hello and than you for this detailled report. :)

Unfortunately, this one is a bug from civ5: IGE itself cannot change a tile's yield, only what it improvements it has and it should never be able to cause this sort of bug. I suggest you quickly report it to the 2k forums because I guess there are other ways to trigger it and that it could somehow be exploited in a multiplayer game without IGE.

On my side, aside of preventing the user to destroy an improvement they just created, there is nothing I can do.
 
Ok thanks. And thank you for this really useful mod!

The most obvious way I know for now to avoid this bug is to unemploy all the plots we want to change first, change them, then reset tiles. It would actually be rather inconvenient if we can't destroy improvements. Maybe write this action into the code? Check if the plot is worked, if it is, then unassign the pop first before changing it, and assign it back after it's changed. Would that be doable?

EDIT: Reported to 2k-games. I wonder if they actually will read the email. I really don't have much faith in game companies when it comes to bugs like these.
 
It is probably doable to forcefully unemploy workers before we change the tile (just a guess, I never tried and the API is not documented enough). However it looks like I cannot know what task they were doing before I unemployed them and, even if I did, I probably cannot make them resume that task. Then it means that the user, once he leaves IGE, would have plenty of unemployed workers and that in order to circumvent a bug I need to hinder other users.

However, I may have an idea. I cannot play civ5 right now, so could you please test it for me? What if you change something on that tile, like adding another river? It should not change the yields since there is already another river, but does it actually fix the yield values? Because I used a little trick to try to force civ5 to recalculate things up in order to circumvent another bug before (adding marble on a tile you owned would not add marble to your civ in early vesions of IGE) so maybe it works here too.

If it does, I could maybe run some batch update on the next turn after you closed IGE.
 
Nah, it's not working.

This time there's no stones next to the river, but there is deers, so I'm using a camp.
City plot = 2/1/1. Unimproved deer = 2/1/1. Both next to same river. City net = 4/5/5.
Now add river on the other side of the already rivered deer. No change.
Now remove river which we just added. No change.
Now build camp on the deer. Deer becomes 2/2/1. City net = 3/7/4. Should be 4/6/5!
Now try adding river on the other side of the deer. No change to plot. City net is still 3/7/4.
Now remove the river we just added. City net still 3/7/4.
Add the river back again. City net 3/7/4. Remove river, 3/7/4.
Further tempering with rivers around the deer plot (leaving the original river untouched) show no change.

So instead of 4/6/5 that we should have, we have now 3/7/4.
Tempering with rivers gave no change whatsoever.

The following is what I've been able to gather as consistently reproducible results.
1) By unemploying the only pop, the Food/Production numbers don't match the city plot numbers.
2) Food numbers always decrease each time, production numbers always increase.
3) It happens with a worked tile, and upon modification of improvements.

Wierrrrrrd :D

EDIT: Oh and I'd rather sit on this version than to have IGE become unwieldy. There's got to be an explanation to this, just have to test it the right way to find out, I suppose.

EDIT2: I tried using the official SDK's Live Tuner to repeat this experiment, but everything works as they should here. It seems that IGE is doing things different to the Tuner. Perhaps there's like a "safe" function call somewhere that the tuner is using. I don't know, just throwing out ideas.
 
EDIT2: I tried using the official SDK's Live Tuner to repeat this experiment, but everything works as they should here. It seems that IGE is doing things different to the Tuner. Perhaps there's like a "safe" function call somewhere that the tuner is using. I don't know, just throwing out ideas.
Huh huh... Thank you, then I know who is the culprit: the workaround I introduced to circumvent the resources bug. I may be able to narrow the use of this trick to resources changes and not use it when you build an improvement, not sure.
 
Claestw, I think it's fixed. :) If you have some time, I would be glad if you could run some tests, in case I didn't correctly reproduced what you described so far.

Anyway, thanks again for your thorough testing and detailled reports, I think you turned a very obscure and hard to understand bug into something clear and easy to circumvent in the end. Well, provided I correctly fixed.
 

Attachments

Cool! I'll play around with it after my deadline today---no, tomorrow, it's an all-nighter for me tonight. Will do some experiments and report back later, but it won't happen for another 15 hours at least. Hopefully I'll still be coherent by then. :lol:

UPDATE: Yes! The bug is no longer! The yields are now correct, although removing an improvement removes the resource graphics as well. Only the graphics, the resources are still there and the yields are still correct. Just the graphics getting removed. Minor glitch. It's not like we're removing improvements all the time. (PS: I did empty cache and test with only IGE active. So people still seeing this bug should maybe clear cache first and try again.)

Great work!
 
I just saw your update, Claestw. Hurrah! :D
Again thank you very much for your thorough testing, your help has been invaluable.

PS: So the first workaround actually triggered a hidden bug and the new workaround now triggers a new one (the missing resource). Firaxis, please stop giving me headaches!
 
Hi ! I would like to know how to make an independent scenario file without any mod, just a map with already placed stuff...

Thanks, i would like a lot to making that !
 
Hello. There is a way in civ5 to save your game as a scenario (look for a checkbox in the save window if my memories are right). After that, I guess you need to edit your scenario in the world builder application.
 
Sorry, i didn't explained well...

In IGE, a button or option for creating a scenario file does it exist ?

If you said that maps or stuff created with your IGE can be loaded without IGE like a regular scenario or map in Civ 5...

What do i must make in IGE options ? The steps must i do ?

My mind was to have a simple map or scenario without any modding...

I hope that i had well answered, thanks :goodjob:
 
Back
Top Bottom