[Map Script] Full of resources

Hi Sto.

I like the idea with all the options to remove unwanted types of land, but I can't seem to get your maps to generate any resources outside the 9 square starting plots except with the 'Resource: Standard' setting.

No matter what I set 'Start resources:' to I always get 2-3 resources in the starting 9 plots, but I never get any resources outside those plots (except with the 'Resource: Standard' setting). I've tried 'Resource:' Normal, Lots and Huge with no luck.

I checked the code and saw that 'Resource: Standard' leaves the normal generation of resources, and all the other settings for 'Resource:' uses your modified code. But i'm not familiar enough with Pyton to be able to test why.

I run with 1.52 patch and no modifications.

Regards Robert
 
Hi wmroger!

I've not seen that with the maps since i've stopped working on the resource generation but the 2-3 resources you see seems to be added by normalizeaddfoodbonus and normalizeaddextra and not by my generation (you must have more with it) so it doesn't work anyway !

So try to remove the cash :

go into the rep : C:\Documents and Settings\'your user name'\Application Data\My Games\civ4
and delete all the rep 'cache' ... don't worry ,it's normal to do that with civ4 ( i can't explain exatly why but this can make such problems and deleting the cache is like reseting civ4)

reply me if it works or not !
And if not : the map you want to play (perhaps the problem is for all ? ) and i will look if i forgot something or if if there is a bug i've not seen . We play only with sto_chess , and i made only few tests with the other maps ,perhaps i made a mistake .
I hope this will work ! :confused:

tcho!
 
Thanks for the fast respons.

I tried to clear the cache, but did no differance.

Turned on the logging (in the ini file) and found in the file PythonErr.log:

Code:
Traceback (most recent call last):

  File "Sto_Chess", line 252, in generatePlotTypes

AttributeError: 'module' object has no attribute 'randint'
ERR: Python function generatePlotTypes failed, module Sto_Chess
Traceback (most recent call last):

  File "Sto_Chess", line 494, in afterGeneration

AttributeError: 'module' object has no attribute 'randint'
ERR: Python function afterGeneration failed, module Sto_Chess
Traceback (most recent call last):

  File "Sto_Chess", line 651, in normalizeAddExtras

AttributeError: 'module' object has no attribute 'randint'
ERR: Python function normalizeAddExtras failed, module Sto_Chess


I hope that helps you. It didn't help me much :(

Regards Robert
 
Very nice map scrip :-).
An option to have goody huts between normal and many would be nice.
Can you make an option to add more animals?
 
It maybe is just me, but I think giving the barbarians Mechanised Infantry to there start towns is a bit much. :)

Civ4ScreenShot0000.JPG


And on top of that giving them 9 exp......
 
Hi wmroger,i look for the problem . It seems that the function randint from the module random don't work .perhaps this is because i install python and the program search this function in python and it does not exist in civ4 (but i think no) .
I never put a mechanized infantry !!! i just look for your reply
you're the first with this kind of problem .the first thing i think is that the problem is with your instalation but i will reinstall civ 4 and uninstall python to see if the maps works !!!
i will search if the module random is full in civ 4 !

a little question ? do you have opened a python file instead of editing it or just copy ?

i continue to work on the problem .
tcho!
 
Hi Zull , I will do that for the next version !
If you can't wait look at the 4th post to customize the goody hut option .

have fun games ,tcho!
 
Hi Sto.

I changed random.randint to use gc.getGame().getMapRand().get instead, so now it kinda works.

randint(1,100) returns a number from 1 to 100, but getMapRand.get(100,"") returns a number from 0 to 99 so I compensate for that. But I get lots and lots of resources. I've trimmed down the init values so much that stchanceland=1 and pachanceland=3 and Normal, but it's still on the heavy side. So maybe something went wrong.

About the mechanised infantry. That was with a mod that adds a unique unit loaded. The result was that the UNIT_ARCHER wasn't 38 anymore, but you had hardcoded the the numbers for the units in the initunit function :)

So part from having abit to much resources everything works for me now.

Regards Robert
 
Sto said:
I never put a mechanized infantry !!! i just look for your reply
you're the first with this kind of problem

Well I had SAM Infantery in all barbarian cities. Was very dangerous to come cose to one.

I played it with the Green Mod. You should not hard code references but look up the names instead like this:
gc.getInfoTypeForString("UNIT_ARCHER")
 
hi wmroger ! I think you should reinstall 'civ4' ,and i don't understand the problem with the mod if you don't load it .
I will change the program to search the value of each resource and unit to avoid those problems .I still do not understand the problem with 'randint' !?
bye!
 
Ok ,wmroger with mechanized and Zuul with sam infantry .I really need to change that .i Will make the program search for the good value of unit and resources !
I don't know there was such problems with the maps ... But i 'am a little sick ,so i can't do that before a week !
thanks ,for all those informations !

TCho!
 
Re wmroger !
For the resources ,my maps is really full of resources perhaps this is normal ,but i will change and try to use the civ4 function !
With the very low setting and no start resources ,you should have about the same of standart generation (a little more ) .perhaps there is another problem ? perhaps civ4 call the function two times if there is a problem and i will fix this to one if this is the problem !

tcho !

PS :thanks Zuul i will use gc.getInfoTypeForString("UNIT_ARCHER") .
 
Can you provide a short explanation of the various settings? Default, normal, and standard seem to be different, but it's not clear how.

And could you possibly offer a way to use standard rules for placing resources? I am not used to seeing Ivory on hilltops and Whales on the coast.
 
hi !

- default is like the map script does before i change .
- standart is like 'civ4' generate .
- normal is that i use between few and lot .

for the resources generation ,i did how i want to see ,if i keep it like original and you change the terrain there will not have lot of bonus type .This is due to my generation mod (almost very simple) .And if i keep original placement ,it don't provide a good frequency of resources.
you can use the standart generation of resources and if you want more resources ,you may make a mod editind the file 'CIV4BonusInfos.xml' here :
http://forums.civfanatics.com/showthread.php?t=153160
(don't edit the original)

have fun games bye!
 
hi charleswatkins:
And could you possibly offer a way to use standard rules for placing resources? I am not used to seeing Ivory on hilltops and Whales on the coast

hi Zuul:
An option to have goody huts between normal and many would be nice.
Can you make an option to add more animals?

I work on the maps and try to make a tool that will allow you to define all settings of the maps , you will be able to change ressources generator or settings for all buttons and customize a random choice for all buttons (if all work !?) .
The only pb is that i can't do it in python (i can't achieve to open a screen and get entry of it before generation of the map ),So i can't make a script that will import MODING settings (like new ressources and units ). I just will try to make it without causing problems with mods .
Zuul ,you play with green mod that have new ressources , do the maps generate these new bonuses like standart generation when you use the resource generator ? it will help me to know (with your gameplay experience ) if ,when you put lots of resources, the new resources are well dispatching .

hi wmrojer:
I changed random.randint to use gc.getGame().getMapRand().get instead, so now it kinda works.

I entirely rewrite the script for the moment and try to use the civ4 random functions .I found another player that have problem with the random module ... Do you install python 2.4 ?

Tcho!
 
hi
When I play with maps STO in multi, I have a problem of synchronizations and I wanted to know if the problem is resolved

thank you
 
HI!
Sorry for this late answer . I think bad synchronisation is due to adding of unit in map script and the only way to play multiplayer is that all non hosting have to leave and reconnect the game .
If some expert civ4 programmer have a solution ? I think i can't fix that sorry !

Tcho!
 
hi!

new version released of all the maps :

- some new buttons to define : wrap, start resources ,default resources ,start on the coast , scale the map , hills , terrain , add rivers .

- a little editor to customize the parameters .

Have fun games ,Tcho !
 
It will be great if anyone of native language English,German,Italian or Spanish could correct the *.txt (except sto_global.txt , and description of resources and units ) ! :thumbsup:

reply me if you are interested and i'll send you my email and the text to correct!

thanks ,tcho !
 
If you use the editor of parameters:

If you've made some configurations of resources or units that you prefer with the original version, or, which are adapted to a MOD in particular.Do not hesitate to send me these configurations (Sto_Global.txt) by email ,with a little note (MOD used and improvements).
I'll make an attachment with these files !

Thanks, Tcho!
 
Back
Top Bottom