Generic Fantasy MODCOMP

Dom Pedro II said:
I did put the icon in, but it still didn't show it, and it also didn't mess up the other icons, so I dunno... is there something I have to do with the XML to get the game to recognize the icon's existence?

Well the gamefont files are quite a bit mysterious to me. You have to take care that you keep the alpha-channel and perhaps you have to put a cyan pixel in the white line to the right of the symbol...
I just have PSP5 and Gimp and it's not really easy to edit those files with these.
 
c.fe said:
Well the gamefont files are quite a bit mysterious to me. You have to take care that you keep the alpha-channel and perhaps you have to put a cyan pixel in the white line to the right of the symbol...
I just have PSP5 and Gimp and it's not really easy to edit those files with these.


I have not, unfortunately, had much of a chance to play with this yet. I do remember, however, that in Civ3, there was an index number for all of the images in these sorts of files, and you had to set the index number in the editor to correspond to the unit or what have you. I don't know what the case is here, but we'll get it.

I have Photoshop myself, which works pretty well for these sorts of files.

I'm using 3DS Max to model a Refinery building to increase "Fuel" output. Is there anything I can make graphically that'd be useful for your mod?
 
Dom Pedro II said:
I have not, unfortunately, had much of a chance to play with this yet. I do remember, however, that in Civ3, there was an index number for all of the images in these sorts of files, and you had to set the index number in the editor to correspond to the unit or what have you. I don't know what the case is here, but we'll get it.
Well the indices are stored and calculated somewhere I just don't know if it's in the SDK and if that the case where these places are. But I got the fourth yield symbol without bigger problems.

Dom Pedro II said:
[...]
I'm using 3DS Max to model a Refinery building to increase "Fuel" output. Is there anything I can make graphically that'd be useful for your mod?

Thanks for the question but I don't currently plan a mod. I just play around with the SDK and hope that someone can make use of it. But if you have time to spare: It would be nice to have some new kind of bonus resource called "magic node" or something that just consists of some sparkling lights (perhaps in different colors). But that's really not important :)
 
c.fe said:
Thanks for the question but I don't currently plan a mod. I just play around with the SDK and hope that someone can make use of it. But if you have time to spare: It would be nice to have some new kind of bonus resource called "magic node" or something that just consists of some sparkling lights (perhaps in different colors). But that's really not important :)

Something like this?

Some improvementst to go with it also exist.
 

Attachments

  • mana.jpg
    mana.jpg
    2.1 KB · Views: 216
c.fe said:
v0.3 Spells!
Great news everyone. I just added the possibility to add spells, that can be cast by units. I even enabled the AI to use them but that part isn't really tested...

Because I made so many changes (e.g. added a new XML file for the spells) I will - aside from the dll - publish a small demo mod at the completed modpacks forum that can be used as base for further experimentation.

So what exactly does this mean then? What is a spell and how is it distinct from attacks? And how does it fit in with the magic? Eager minds want to know! :)

*gets out the notepad*
 
Dom Pedro II said:
So what exactly does this mean then? What is a spell and how is it distinct from attacks? And how does it fit in with the magic? Eager minds want to know! :)

Spells are additional abilities that you can grant to units. There are currently three types of spells:
  • Damage one unit
  • Damage all units of a stack
  • Destroy a random building in a city (AI doesn't use them (yet))
Every unit can have mana and you can set the mana cost of every spell. If you now select a unit that you granted a spell you get an additional button that you can use to cast the spell.

If you want to build a mod on top of it take a look at the showcase mod. Especially at the file "XML\Magic\Civ4SpellInfos.xml" and the Unit "UNIT_MAGE" in "\XML\Units\CIV4UnitInfos.xml". Notice that it isn't quite complete yet, there is fourth type of spell, that isn't implemented yet, I didn't test the destroy building spell, and some new things aren't exposed to python (yet).

Well that's a short summary if you run into troubles feel free to ask. :)
 
Dom Pedro II said:
Is it pulling the mana from the national/city pool? Or does each unit have its own pool to draw from?

It uses the current unit's mana pool. I also want to enable something like global spells, that draw from the national pool but I'm not exactly sure how to program this.

Dom Pedro II said:
Also, does the game display available mana reserves?
If you mean the unit's mana reserve: Yes they are displayed when you select a unit that has mana. It's just a python-thing to show that so it's up to modders to change the way this gets displayed.
 
Nice. While a national mana pool would be good too, I actually would rather have a unit-specific mana pool... at least for the purposes of a fuel mod.

Excellent. This is coming along great!
 
c.fe, I have a bit of a request... would it be possible to make it so that there could be attributes for existing unit actions that would require mana as well?

And would it be possible to make it so that movement requires mana?

Obviously, I'm thinking about the fuel mod, but I'm sure it could be useful for a fantasy scenario/mod as well.
 
Dom Pedro II said:
c.fe, I have a bit of a request... would it be possible to make it so that there could be attributes for existing unit actions that would require mana as well?

And would it be possible to make it so that movement requires mana?

Obviously, I'm thinking about the fuel mod, but I'm sure it could be useful for a fantasy scenario/mod as well.

Well I could at least try to put the mana/per movement thing in.

Another idea I just got: Make spell that draws mana/fuel from the pool and gives it to the unit. Could be some refueling for your mod and some mana recharge for the fantasy settings.

I'll look into these two. Shouldn't be to difficult. :)
 
Excellent work c.fe !! Just what i need!

I am trying to implement a new production system in which cities uses hammers and consume resources to produce stuff. But I've not been able to add new yields yet :(

Could you share the source code? I'll send you a pm with my email. Thanx in advance.
 
Guagle said:
Excellent work c.fe !! Just what i need!

I am trying to implement a new production system in which cities uses hammers and consume resources to produce stuff. But I've not been able to add new yields yet :(

Could you share the source code? I'll send you a pm with my email. Thanx in advance.

If I'm not mistaken you want to add yields just as I did but handle them completely different. As I can't provide you with the handling part I just tell you how to add the yield (it's quite easy).

Just open CvEnums.h and search for
Code:
YIELD_COMMERCE,
and add the line(s)
Code:
YIELD_RESOURCE_X,
... and so on below it. If you want to provide your new yield via python search for
Code:
"YieldTypes"
in CyEnumsInterface.h and change the code there accordingly.

I don't know if you have to change all xml entries where yields appear but be prepared to do some boring editing here ;) .

It's also not obvious how to make the new yield appear in the city view. If you find a way please tell me.

Hope this works.

Edit: P.S.: New version coming soon with refill-spell, mana cost per move and two mana-related promotiontypes.
 
c.fe said:
Edit: P.S.: New version coming soon with refill-spell, mana cost per move and two mana-related promotiontypes.


:drool: I hadn't even thought about mana and promotions! I eagerly await! :D
 
could you use spells to create units costing mana and movement points,
for example:
creating a spectral warior costs 2 mana and one movemant point,
creating a spectral knight costs 4 mana and two movement points

I know Kael made unit summons, but it would be cool to intergrate mana into the equation.
I just want the framework so that I can possibly figure out how to make other unit summons.


also, summons conditional on the terrain the mage unit is standing on, for example:
forests = beasts
plains = centaurs
hills = giants
grasssland = soldiers
jungle = swarm of insects
coast = sea serpent
ocean = whales

I was also thinking, could you tie certain spells to promotions
for example:

Green mage I
+5% healing rate in forest tiles
can cast:
-summon dryad (creates a temporary dryad)
-summon treant (creates a temporary treant)
-oxidize (damages armored units -50%)


I know, you give an inch I ask for a mile.:worship: :help:
 
c.fe said:
Well I could at least try to put the mana/per movement thing in.

Another idea I just got: Make spell that draws mana/fuel from the pool and gives it to the unit. Could be some refueling for your mod and some mana recharge for the fantasy settings.

I'll look into these two. Shouldn't be to difficult. :)

what about spy actions that cost commerce, couldn't you take one of those, make it cost magic and change it to replenish mana instead of whatever else it does? That would be the easiest, most direct route I would think.
 
Xereq said:
could you use spells to create units costing mana and movement points,
for example:
creating a spectral warior costs 2 mana and one movemant point,
creating a spectral knight costs 4 mana and two movement points

I know Kael made unit summons, but it would be cool to intergrate mana into the equation.
I just want the framework so that I can possibly figure out how to make other unit summons.

I made a summon spell that uses mana and 1 movement point. It creates a popup listing all of the units you can summon (populated by units that have a production cost <= the caster's current mana). The only bug is that it includes unique units and I don't want people to be able to summon unique units from another civ.

Roger Bacon
 
Xereq said:
could you use spells to create units costing mana and movement points,
for example:
creating a spectral warior costs 2 mana and one movemant point,
creating a spectral knight costs 4 mana and two movement points

I know Kael made unit summons, but it would be cool to intergrate mana into the equation.
I just want the framework so that I can possibly figure out how to make other unit summons.
If I did implement a summon spell (I intend to - eventually) you could of course make it cost mana. I could make it cost movement, too but that's not too much of a priority.


Xereq said:
also, summons conditional on the terrain the mage unit is standing on, for example:
forests = beasts
plains = centaurs
hills = giants
grasssland = soldiers
jungle = swarm of insects
coast = sea serpent
ocean = whales

This is possible but also low prio.

Xereq said:
I was also thinking, could you tie certain spells to promotions
for example:

Green mage I
+5% healing rate in forest tiles
can cast:
-summon dryad (creates a temporary dryad)
-summon treant (creates a temporary treant)
-oxidize (damages armored units -50%)


I know, you give an inch I ask for a mile.:worship: :help:

The promotions-enable-spell thing could be interesting. That should make it as one of the next things :)
 
Top Bottom