• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Quick Modding Questions Thread

You are probably basing your entries on the wrong version of the file. The BtS version of a UnitArtInfo entry has some tags that the original, no expansion, version did not have. You need those tags.

How is this all started i will tell you. I copy unit (unitinfos only because i use some galley which is unique unit for some civilization, i try to test something) from Realism Invictus, and units in Realism Invictus don't have same tags as units in BTS. And i have lots of errors i remove Realism Invictus tags and i get this XML error with DON'T SEND, maybe i am remove some another tag which belong to BTS!? I copy today some another galley from Realism Invictus, with think maybe this work again, i get error for tags and finally i again see my main menu, when i go i civilopedia i haven't any units. What now to do? If i understand real problem is in Unitinfos, but i am maybe confused. Is there some XML programs with easily and faster XML moding, which will show me where i wrong with tags (forgot some tag, remove some tag).
 
I use and remove tags i know that about schema and .dll (i don't want to add new tags i copy unit from Realism Invictus remove tags and want to make for BTS (my mod) :)
 
You know, if you don't want to use any new tags from RI, it would be easier to just copy a unitinfo from the unmodded BTS folder, and just transfer the relevant data.
Rather than use the modded RI version and try to figure out which is an extra tag and delete...
 
I am solve the problem.
I will tell something, maybe is some tell this before me, but i will tell.
I put units UNITCLASS_SLOOP, UNITCLASS_WAR_GALLEASS in my UnitInfos, these two units have ART_DEF_UNIT_WAR_GALLEASS and ART_DEF_UNIT_SLOOP as <EarlyArtDefineTag>. I don't put ART_DEF_UNIT_WAR_GALLEASS and ART_DEF_UNIT_SLOOP in my CIV4ArtDefines_Unit. Because i am get DON'T SEND ERROR.
 
Hello, everyone.
I'm working on a new mod that centers on China and I would like to add several historical events.
Is it possible to add an event that:
  • Is scheduled to certainly happen at at a historical date (like 660 AD)?
  • has a window with a picture that you can choose?
  • has a sound when it appears?
  • Where you can choose some options what you will do with the event (Like do nothing)?
  • That has both notification and window?
To clarify I would like to add these events:
660 AD
Only a notification and sound is sufficient: Following Emperor Gaozong's illness. Empress Wu becomes the regent of China! She shall remain de facto regent until His Majesty recovers!
690 AD (note the window only appears if you play as the Tang another Chinese faction and only if you control Chang'an)
For the first time in history a woman has become Emperor of China herself! Empress Wu has formally proclaimed herself Empress of China and has founded the Second Zhou Dynasty! (a large amount of enemy units of the unplayable Second Zhou Dynasty appear around Chang'an)
(then there would be several things you could do)
Ho would you like to proceed:
  • She won't be a threat to our glorious empire!(nothing happens except for the spawning enemy units)
  • Suppress this heresy! Gather an army to bring down that evil woman (-2 population in all cities, receive units in Chang'an)
I would like to add more of this sort events in the future
Thank you!
 
I think before I ask modding questions I should find out if what I'm thinking of doing has been done, can be done and/or if it sounds interesting?

I'm picturing a Modern age flat map with "Requires Complete Kills" selected. You have seemingly Para trooped 5 or so units in a remote part of the map, these units are highly promoted with a decent variety of Promotions between them. On this first turn you notice you do have a small City named "Outpost Rally" a considerable distance away, and the rest of the map is BLACK.

Player 2 is on your TEAM and is in exactly the same condition (Maybe duplicate for Player 3).

The small OUTPOSTS for each player are almost adequately defended and they all fall within the next few turns to Prepositioned enemy units tasked to Take them at all costs (maybe for a needed Strategic Resource).

In the first 3 turns I want to have something Display a Message that these cities have approaching enemy units capable of over running them and by the next turn you can only see them under the Fog of War no longer under your control. Now I want to Display an Updated Briefing to each of the Team Groups of their NEW MISSION.

This is a Team Unit Management Scenario that has an Ocean blocking their main objective. Alternatively there is a well defended Land Bridge but will Cost the Majority of the Team's units. The choices other than that is to take Coastal Cities to Acquire the means to cross.

I know that I want to Achieve an objective to win the scenario but I'm not sure what the WB is Capable of.

My initial thought was the use of Wonders, these Wonders are cheap (1 or 2 turns) and upon completion gives you Briefings (the Teams must all do this individually) and their next objective and so on. These Wonders have prereqs that you already have but can be completed by the opposing enemies but the tech path is long and worthless but could be completed just to get the teams Objectives.

If at least One unit from the surviving team's units make the objective it is an instant win.

What do you think?
Thanks
Eclipse
 
Til the wonders part I'd say this is doable, with a bit of Python.
For the wonders stuff, you'd probaly need a good heap of Python.
But I'm not sure if the AI will be able to deal with it. Might be, might be not.

Regardind the Wonder stuff, can this be done in another way or should I use a Human Neutral player to act as "Mr Big" to send in game messages?

Does the whole thing sound like a worthwhile venture?
 
With python, you can send messages upon "something"
Like turn X, building built, unit died blah blah blah

There is no need for a virtual player to do that
 
Depends on my availablity :D
Although there are many working examples for delivering messages through python when something happens
 
HI guys

I have this python exception, I am just not sure what I am looking for to fix it, I am also not sure if it is a python or SDK issue that is causing it.
The other thing is that I have touched these files as far as I am aware, so I am just having a hard time figuring out what has gone wrong.
Spoiler :

Type error: __init__() Takes exactly 1 argument (2 given)

File "BugUtil", line 651, in callFunction

File "BugConfig", line 547, in handle

File "BugConfig", line 318, in process

File "BugConfig", line 337, in end

File "BugConfig", line 334, in endChild

File "BugConfig", line 337, in end

File "BugConfig", line 110, in unknown_endtag

Traceback (most recent call last):

Anyway Hope someone can help me wrap my head around the issue cheers!
 
ah ok, it is related to that issue, it is 1 line of code connecting to one of the fury road python modules, for some reason it does not like the line of code that points to it but I am still trying to figure out why, for now I have just disabled the line and it seems to have made all the issues go away so
Thankyou, I don't think I would have ever figured out it was related to that :-)
 
I have been having some development frameworks issues that I need to resolve, before I continue. Most importantly, it is the historical comparison of divisions between nations.

For example Russia had nearly 700, China possibly similar (unknown at this stage), Germany had about 300-400, Japan up to 200 and the Allies about 200 as well, and Italy about 100.

In RTWH 1.04, I used corps, armies and army groups to reflect these differences. With the move to Divisions only, I need to find some other way of showing the historical differences. I also used class limits to control how many of the particular unit type could be built. And due to the performance issues, I will need to also control the number of units that can be built, and also try to be historically accurate.

If I set for example an artificial limit of 200, larger nations would not reflect the historical accuracy. However, I could alternatively set say 300 as the upper limit, but then smaller nations would not be historically correct either.

I hope you can see my dilemma.

However, as this Mod is called "The Road to War", maybe setting a higher limit may be OK, and I find some way of making too many units actually cost to much gold and use the Civ 4 economics systems to control the actual numbers. i.e. making units cost more to support. i.e. would the AI realise it can not support any more units and stop building more.
 
I want to make prereq civic for building with python and i am found this in CvGameUtils.py

Code:
		# Slave Cage 
		ePlayer = pCity.getOwner()
		pPlayer = gc.getPlayer(ePlayer)
				
		if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_LABOR')) != gc.getInfoTypeForString('CIVIC_SLAVERY'):
			if eBuilding == gc.getInfoTypeForString('BUILDING_SLAVE_CAGE'):				
				return True
		
		[COLOR="Red"]if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_LABOR')) == gc.getInfoTypeForString('CIVIC_EMANCIPATION'):
			if eBuilding == gc.getInfoTypeForString('BUILDING_SLAVE_CAGE'):
				return True[/COLOR]
				
		# End Slave Cage

What do this red codes? Did this important for this code and why? I don't have CIVIC_EMANCIPATION in my mod, because i make fantasy mod.
 
It means:
If the player's civic choice under Labour is Emancipation:
And the building you are enquiring is Slave Cage
Definitely cannot build it

Provided python callback is activated and this section is under cannotConstruct
 
Back
Top Bottom