lemonjelly
Modding For Ethne
How would it flood its banks? Like, gameplay-wise? :S
Well, I have a little python problem with making the range it affects changes depending on what improvement is built on it. I have re-coded death, coded mind, fire and sun.
I don't know whether to release without the better ranges or not? What do you lot think?
def FatCrossShape( centerX, centerY, maxRange, minRange=None ):
maxRangeSquared = (maxRange+.5)**2
if minRange is None:
minRangeSquared = -1
else:
minRangeSquared = (minRange+.5)**2
for offsetX in xrange( -maxRange, maxRange+1 ):
for offsetY in xrange( -maxRange, maxRange+1 ):
if minRangeSquared < offsetX**2 + offsetY**2 < maxRangeSquared:
yield ( centerX + offsetX, centerY + offsetY )
# ICE MANA
if iBonus == iIceMana:
iX = pPlot.getX()
iY = pPlot.getY()
for iiX, iiY in FatCrossShape( iX, iY, 2):
pPlot = getPlot(iiX,iiY)
tempRand = randNum(100, "ChangeChance")
if ( tempRand < 3 ) :
if not pPlot.isNone():
if not pPlot.isWater():
if pPlot.getTerrainType() != iSnow:
pPlot.setTerrainType(iSnow,True,True)
if pPlot.isWater():
if pPlot.getFeatureType() != iIce:
pPlot.setFeatureType(iIce,0)
elif (tempRand<31) :
if not pPlot.isNone():
if not pPlot.isWater():
if pPlot.getTerrainType() != iSnow:
iRnd = randNum(12, "Snowfall") + 6
pPlot.setTempTerrainType(iSnow, iRnd)
if pPlot.isWater():
if pPlot.getFeatureType() != iIce:
pPlot.setTempFeatureType(iIce, 0, randNum(5, "Bob") + 10)
ManaIsShiny = ManaIsShiny.ManaIsShiny() #Added in Mana Is Shiny mod: lemonjelly
Urm... I'm not too sure what your taking about... (Bolded the bit that really confused me)In fact, I think you should make ManaIsShiny.ManaIsShiny a module level function, drop the self argument that you never use, remove the empty ManaIsShiny class and remove the line
for iiX, iiY in FatCrossShape( iX, iY, [B]2[/B]):
Obviously, I had the def FatCrossShape, but I didn't know how to use it, so that's why I didn't use it. With your code, could you change one, I don't really mind which, to make the shapes like this:
Spoiler :
Mana without a node
x.x.x
x.o.x
x.x.x
With a node.
n.x.x.x.n
x.x.x.x.x
x.x.o.x.x
x.x.x.x.x
n.x.x.x.n
With a Unique Feature that has mana attached.
n.n.x.x.x.n.n
n.x.x.x.x.x.n
x.x.x.x.x.x.x
x.x.x.o.x.x.x
x.x.x.x.x.x.x
n.x.x.x.x.x.n
n.n.x.x.x.n.n
Why did you change it to 2? Is there a reason?Code:for iiX, iiY in FatCrossShape( iX, iY, [B]2[/B]):
manaStrings = ['MIND', 'ICE', 'DEATH', 'NATURE', 'LIFE', 'ENTROPY', 'ENCHANTMENT', 'METAMAGIC', 'AIR', 'BODY', 'CHAOS', 'EARTH', 'FIRE', 'LAW', 'SHADOW', 'SPIRIT', 'SUN', 'WATER', ]
manaNodes = set( getInfoType('IMPROVEMENT_MANA_' + mana) for mana in manaStrings )
# ICE MANA
if iBonus == iIceMana:
iX = pPlot.getX()
iY = pPlot.getY()
[B] if iImprovement in manaNodes:
maxRange = 2
elif gc.getImprovementInfo(iImprovement).isUnique():
maxRange = 3
else:
maxRange = 1
for iiX, iiY in FatCrossShape( iX, iY, maxRange ):[/B]
pPlot = getPlot(iiX,iiY)
tempRand = randNum(100, "ChangeChance")
if ( tempRand < 3 ) :
if not pPlot.isNone():
if not pPlot.isWater():
if pPlot.getTerrainType() != iSnow:
pPlot.setTerrainType(iSnow,True,True)
if pPlot.isWater():
if pPlot.getFeatureType() != iIce:
pPlot.setFeatureType(iIce,0)
elif (tempRand<31) :
if not pPlot.isNone():
if not pPlot.isWater():
if pPlot.getTerrainType() != iSnow:
iRnd = randNum(12, "Snowfall") + 6
pPlot.setTempTerrainType(iSnow, iRnd)
if pPlot.isWater():
if pPlot.getFeatureType() != iIce:
pPlot.setTempFeatureType(iIce, 0, randNum(5, "Bob") + 10)
Urm... I'm not too sure what your taking about... (Bolded the bit that really confused me)
And, remove that line and replace it with what? Surely it won't work without it?
Sorry, I'm not the best person when it comes to python.
Urm, I added in that code, all works well apart Death mana doesn't change forests into haunted lands and the range doesn't change at all, just the one ring around the mana.
iNode = ['IMPROVEMENT_MANA_DIMENSIONAL','IMPROVEMENT_MANA_AIR','IMPROVEMENT_MANA_BODY','IMPROVEMENT_MANA_CHAOS','IMPROVEMENT_MANA_DEATH','IMPROVEMENT_MANA_EARTH','IMPROVEMENT_MANA_ENCHANTMENT','IMPROVEMENT_MANA_ENTROPY','IMPROVEMENT_MANA_FIRE','IMPROVEMENT_MANA_FORCE','IMPROVEMENT_MANA_ICE','IMPROVEMENT_MANA_LAW','IMPROVEMENT_MANA_LIFE','IMPROVEMENT_MANA_METAMAGIC','IMPROVEMENT_MANA_MIND','IMPROVEMENT_MANA_NATURE','IMPROVEMENT_MANA_SHADOW','IMPROVEMENT_MANA_SPIRIT','IMPROVEMENT_MANA_SUN','IMPROVEMENT_MANA_WATER','IMPROVEMENT_MANA_CREATION']
iNode = [getInfoType('IMPROVEMENT_MANA_DIMENSIONAL'), getInfoType(' ... ]
iNode = set([getInfoType('IMPROVEMENT_MANA_DIMENSIONAL'), getInfoType(' ... ])
I kept it in class ManaIsShiny because I can't see any benefit from spending 5min going through deleting one tab from every line![]()
What are the xp/level ratios for Charismatic and Normal?
NRML..2..5..10
LVLS...1..2...3
CHRS..
I don't know the Charismatic ones, or the rest of the normal ones...
level xp Charismatic
2 2 1.5
3 5 3.75
4 10 7.5
5 17 12.75
6 26 19.5