Afforess
The White Wizard
Is it possible to use relative path to base schema ?? (( Like: "../../Assets/Units/CIV4UnitSchema.xml" ))
No; it doesn't work. Tried it already. I wish I could keep my Schema's in one spot, but sadly...
Is it possible to use relative path to base schema ?? (( Like: "../../Assets/Units/CIV4UnitSchema.xml" ))
I've done it, but apparently its buggy. Worth a try, but keep in mind that the XML for events isn't perfect.
for events i need CvRandomEventInterface.py because the PythonCallback refers to this file.
making new file to be modular isn't problem
How to Make Python true Modular
Python generally cannot be made modular. If you modify cvgameutils.py for example, a later patch would erase all your changes. However what you can do is to link to python via XML. To do this you need to use the import command.
<SpellInfo>
<Type>SPELL_MAKE_FUNNY_STUFF_WITH_PYTHON</Type>
<PyResult>__import__('funnystuff').spellSpiralGate(pCaster)</PyResult>
<PyRequirement>__import__('funnystuff').reqSpiralGate(pCaster)</PyRequirement>
</SpellInfo>
In this case the python code would be in the funnystuff.py file and everytime you apply a new Wildmana patch this file isn't touched, so your python changes persist.
Currently you can do this via spells and traits. For Spells, the requirement and result of a spell can be made modular. For traits the pythonPerTurn can be made modular.
Theoretically allmost all python could be made modular if there is a need for a modmod by adding SDK support for additional python callback via XML.
[...]
Now I found this in another thread: ( http://forums.civfanatics.com/showpost.php?p=9037399&postcount=4 )
the part with the __import__('funnystuff') would be exactly what i need for the event PythonCallback:
<PythonCallback>__import__('funnystuff').doPyMyModEvent1</PythonCallback>
<PythonCanDo>__import__('funnystuff').candoPyMyModEvent1</PythonCanDo>
<PythonHelp>__import__('funnystuff').helpPyMyModEvent1</PythonHelp>
i tryed it but unfortunately its not working
is there some way to add this __improt__ thingy in RifE so it works with the CIV4EventInfos.xml ?
[...]
Still it's easy making the random event file modular, so it should be possible soon anyway.
what do you mean with soon?
Now I found this in another thread: ( http://forums.civfanatics.com/showpost.php?p=9037399&postcount=4 )
Spoiler :
the part with the __import__('funnystuff') would be exactly what i need for the event PythonCallback:
<PythonCallback>__import__('funnystuff').doPyMyModEvent1</PythonCallback>
<PythonCanDo>__import__('funnystuff').candoPyMyModEvent1</PythonCanDo>
<PythonHelp>__import__('funnystuff').helpPyMyModEvent1</PythonHelp>
i tryed it but unfortunately its not working
is there some way to add this __improt__ thingy in RifE so it works with the CIV4EventInfos.xml ?
what do you mean with soon?
i'd like to play rife 1.30 with modular imperial roads! lol
so i noticed that a lot of the python code has been written differently, and i was wondering what the implications of this were (if there were any) such as, can i just keep writing code the way it used to be done, or am i going to have to relearn it?
Also, im a little unsure how modular python works, could someone explain this?
from CvPythonExtensions import *
import PyHelpers
import CvEventInterface
import CvUtil