member66170
King
- Joined
- Oct 30, 2005
- Messages
- 807
.
Last edited:
Good. If your work involves any xml you can use the vanilla files like lopez and mark the changed entries for me.Lord Olleus said:I have only just started redoing all of the python so merging it with Lopez's code should be easy. I will do everything I can to meet the deadline, and will tell you in advance if I can't.
You could always just use the sniping ability from the sniper mod and change the name of the unit combat from UNITCOMBAT_SNIPER to UNITCOMBAT_CASTER.Lord Olleus said:My todo list
- Add a way for the player to choose a square for certain spells
Lord Olleus said:This is all of the code so far.
It includes all of TheLopez's code as well as an early version of the spell system. The spell system works like this.
A unit can cast 1 spell per UNITCOMBAT_SPELL_BOOK it carries. If it carries 3 books it can cast 3 different spells.
When a spell is cast CvSpellsInterface.onCastSpell() (in python/entrypoints) is run. Instructions on how to modify that file are included. The only XML changes I have made are in Units/MissionInfo.xml, feel free to change anything there apart from the order of the missions and their name. And in XML/BasicInfo/CvBasicInfo.xml. You can change the name of UNITCOMBAT_SPELL_BOOK, but whatever unitcombat spell books have, it MUST be at the top of the list.
My todo list
- Add a way for the player to choose a square for certain spells
- Remove all hard coded limits by XML attributes.
http://www.civfanatics.net/uploads12/New_Warhammer1.zip
# Tells the mercenary that the player no longer needs their services and performs the
# necessary operations to remove the mercenary from the game and make them available to
# other players
def fire(self):
if(self.objUnit == None):
CvUtil.pyPrint("We should never reach this point, why did the player have access to this mercenary?")
return
# if the mercenary is in a group do not allow the player to fire the mercenary independantly,
# all for one and one for all, in fact, the mercenary manager should not display the individual
# mercenaries from groups in the hired mercenary list.
if(self.objMercenaryGroup != None):
CvUtil.pyPrint("We should never reach this point, mercenary groups are not implemented!!")
return
if(g_bDisplayMercenaryMessages and self.iBuilder != -1 and self.iBuilder != self.iOwner):
strMessage = self.getName() + " is no longer needed by " + gc.getPlayer(self.iOwner).getName()
# Inform the player that the mercenary has been fired.
CyInterface().addMessage(self.iBuilder, True, 20, strMessage, "", 0, "", ColorTypes(0), -1, -1, True, True)
# Set the mercenaries promotion list before removing the mercenary from the game
self.promotionList = self.getCurrentPromotionList()
# Set the mercenary's hire cost before removing the mercenary from the game
self.iHireCost = self.getHireCost()
# Set the mercenary's experience level before removing the mercenary from the game
self.iExperienceLevel = self.getExperienceLevel()
# Set the mercenary's level before removing the mercenary from the game
self.iLevel = self.getLevel()
# Set the hired flag to false before removing the mercenary from the game
self.bHired = false
tmpOwner = self.iOwner
# Set the mercenaries owner to -1 before removing the mercenary from the game
self.iOwner = -1
# Remove the unit from the game
[B]self.objUnit.kill(true,PlayerTypes.NO_PLAYER)[/B]
# Make sure that we get rid of the reference to the unit
self.objUnit = None
Yes, the range is variable and yes, the AI understands how to use the sniper feature. Geez, I thought you played all my mod comps LO.Lord Olleus said:But does it have a range of bigger than 1 and does the AI understand it?
Here's a line that should trigger the camera to zoom in closer in game. I also found some values in the detailmanager.xml that seems to affect camera distance.Sto:
Ok ... I've added this line into onGameStart() (i don't know if it's the better place) but that 's seem to work without problem :
CyVariableSystem().setValueString('CAMERA_MIN_DISTANCE','400')
For this you can always zoom out or not? I don't want to trigger the max distance only the mindistance. Of course we would have to playtest it how it turns out. But I really don't get your problem hereLord Olleus said:But doesn't that mean that you can see less of the map? I would rather see my surroundings than the actual models.