Generic Fantasy MODCOMP

c.fe

Warlord
Joined
Sep 20, 2003
Messages
133
Location
Germany
v0.5alpha Multiple Maps
Yeah, multiple maps... Don't get your expectations too high. There are now two planes. And you can switch between them by using a spell or clicking a button. But this doesn't work as smooth as I'd like. On the second map/plane you see the resources and the citynames of the first map/plane. And you can't really save and load. And I'm sure there are some other bugs I didn't find yet.
But at the moment I'm not motivated enough to do anything to fix any of these. So I if you are go on and take a look. Feel free to ask questions if you want.

You can download the source and the Demo-Mod.

v0.4 Promotions and Movement
Well, this update could have come earlier but an exam at university was distracting me. Important changes:
  • Promotions can raise the maximum mana points or the mana regeneration of a unit
  • You can have a mana per move cost. This means (amongst other things) you can have units that just move (for example) every third turn.

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.

v0.2 Magic as a yield
I've made a custom CvGameCoreDLL.dll that allows a mod to have magic as another tile yield. I also added the possibility to fine-tune unit support a bit more. You can now specify how much upkeep a unit needs and you can even specify magic upkeep.

Additional comments:
I plan (if I don't get to lazy) to add further features to this mod to increase the modability towards the fantasy theme.

If someone wants the source i can send it to him/her.

The .dll can be found here.
The source can be found here.

Feel free to make suggestions on how to continue. :)
 
Good work. :thumbsup: I'm going to play around with it in a couple days, when I have some more free time.

One idea for a thing you could add next: Maybe add the ability to give units different "spells" on the main map (in the form of new button commands), and when a spell is cast it costs some of the magic you have saved up.
 
Dual said:
Good work. :thumbsup: I'm going to play around with it in a couple days, when I have some more free time.

Thanks! I'd be interested to see how it turns out.

Dual said:
One idea for a thing you could add next: Maybe add the ability to give units different "spells" on the main map (in the form of new button commands), and when a spell is cast it costs some of the magic you have saved up.

That is something I thought about but it's a lot more complicated. I'd have to somehow handle the AI. Perhaps I put this decision making into python... Well, just thoughts but spells are an aspect that I'll at least try to inplement.
 
c.fe said:
Thanks! I'd be interested to see how it turns out.



That is something I thought about but it's a lot more complicated. I'd have to somehow handle the AI. Perhaps I put this decision making into python... Well, just thoughts but spells are an aspect that I'll at least try to inplement.

You can look at the SpellDemo mod. It comes with two damage spells. I added a teleport spell, a healing spell, and a spell that adds 100 plot culture in a 3x3 square grid. I was planning on adding a summon spell but ran in to some difficulty. Unfortunately, the AI doesn't know how to use any of these though.

Roger Bacon
 
RogerBacon said:
You can look at the SpellDemo mod. It comes with two damage spells. I added a teleport spell, a healing spell, and a spell that adds 100 plot culture in a 3x3 square grid. I was planning on adding a summon spell but ran in to some difficulty. Unfortunately, the AI doesn't know how to use any of these though.

Roger Bacon
I took a quick look at it and it could indeed be quite useful. At least for the targeting stuff of the UI.
 
NikG said:
Hey c.fe just what to thank you for this. Without the 4th yield thread I would not have begun on my own exploration of the SDK, and you short file here (the txt) gave me something to start with.

Hey, nice to see that someone can make use of it. I'm interested to see how it will turn out.
 
I can't wait to see how a 4th yield plays out. Keep up the good work guys!
 
Hum, it's a very good idea, but i don't understand what the "CvUnit element type" is... Can you help me ? ^_^

And i have test it, it don't seem to work...
 
jojoweb said:
Hum, it's a very good idea, but i don't understand what the "CvUnit element type" is... Can you help me ? ^_^

Of course :) . That really doesn't make too much sense. I was referring to the following lines in the unit schema file:

Code:
<ElementType name="UnitInfo" content="eltOnly">
...
</ElementType>

Where I wrote the dots there are quite a lot of element tags and you have to add the mentioned elements (iGoldSupport and iMagicSupport).

I hope that's not even more confusing ;)
 
This is absolutely fascinating! I've been waiting to see for something as profound and dramatic a change as this.

I wonder now whether or not this could be the means to developing quantified resources? I've always been frustrated that you need only one source of Oil for an entire civ to build an infinite number of units requiring it, etc. Could this maybe be the means of changing that?

Or would it be possible to change that within the existing framework of the resource system?

EDIT: I would also like the source code if that's not too much trouble :)
 
Uh... wow... have you tried playing this yet, c. fe? The game went completely bizzerk when I tried to load it. There were a TON of exceptions when it was loading, and some of them involved XML files I didn't even touch, so I assume it must be a problem with the dll. One of the things I noticed was that it was telling me there were things wrong with the files located in directories with slashes going like "/" like with internet addresses as opposed to "\" for windows directories. Could this have anything to do with it? I don't know how much, if at all, you were required to input new info regarding where to locate files, but this might be the culprit.
 
Dom Pedro II said:
Uh... wow... have you tried playing this yet, c. fe?
Yes.
Dom Pedro II said:
The game went completely bizzerk when I tried to load it. There were a TON of exceptions when it was loading, and some of them involved XML files I didn't even touch, [...]
Did you change your XML files as I said in the attached text file? You can't just use the dll without doing the modifications i mentioned there.
Dom Pedro II said:
I wonder now whether or not this could be the means to developing quantified resources?
Well, all the things, that i changed had little to do with how resources work. Granted, you can now have resources that yield magic but aside from that... A quantified resource system could, of course, be developed, but that's not my next goal.
Dom Pedro II said:
I would also like the source code if that's not too much trouble
No problem at all, if you PM me your e-mail I send it to you. :)
 
c.fe said:
Did you change your XML files as I said in the attached text file? You can't just use the dll without doing the modifications i mentioned there.

I made the changes as you specified... I must be making a mistake somewhere though.. :(


Also, what about the improvements and terrain information? How can we make it so that one kind of improvement/bonus/terrain produces the magic? Do we just add another "yield" tag to the current ones?
 
Dom Pedro II said:
I made the changes as you specified... I must be making a mistake somewhere though.. :(
Hm. Can you tell me what message you get?

Dom Pedro II said:
Also, what about the improvements and terrain information? How can we make it so that one kind of improvement/bonus/terrain produces the magic? Do we just add another "yield" tag to the current ones?
Yes, you can do that. Just put a fourth yield tag somewhere and you get an terrain/specialist/improvement/building that generates magic.
 
c.fe said:
Hm. Can you tell me what message you get?

I figured it out :) Now the fun begins.


Yes, you can do that. Just put a fourth yield tag somewhere and you get an terrain/specialist/improvement/building that generates magic.

Excellent.

I decided that I'm going to use the "magic" in a non-fantasy mod as "fuel" (gasoline, jet fuel, etc.) that will be generated from oil wells and refinery buildings. So I'm testing that out right now. Thanks.
 
So I tried it out after I finally got it working (my fault entirely... no worries :) ) It does indeed work.

I've created a mod in which "magic" has been named "Fuel" and is meant to represent various petroleum products required to keep tanks, planes and helicopters running. And I'll use the new functions exposed to Python to try to create some kind of supply line system to really expand the art of economic warfare.

I did notice that the gold support and the magic support did not do anything in and of themselves. I tried setting the gold and magic supports obscenely high for Warriors just to see what would happen and it had no changes at alll. So I'm guessing I have to "hook it up" so to speak through different Python events that would have essentially whatever effect that I want?

I also noticed that the icon for magic doesn't show up on the tooltip. It shows me the correct number of magic per tile, but it doesn't display the icon (in this case a barrel of oil). I don't know what I need to do to get that to display.
 
Dom Pedro II said:
I did notice that the gold support and the magic support did not do anything in and of themselves. I tried setting the gold and magic supports obscenely high for Warriors just to see what would happen and it had no changes at alll. So I'm guessing I have to "hook it up" so to speak through different Python events that would have essentially whatever effect that I want?
Well, did you test it with a lot of units? The support system take sfree units into account!

Dom Pedro II said:
I also noticed that the icon for magic doesn't show up on the tooltip. It shows me the correct number of magic per tile, but it doesn't display the icon (in this case a barrel of oil). I don't know what I need to do to get that to display.
You can put a fourth icon after the commerce icon in the gamefont files. That worked for me but it made most of the other icons appear to be indexed wrong.
 
c.fe said:
Well, did you test it with a lot of units? The support system take sfree units into account!

:blush: Of course... I'd forgotten about that...


You can put a fourth icon after the commerce icon in the gamefont files. That worked for me but it made most of the other icons appear to be indexed wrong.

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?
 
Back
Top Bottom