Magic Codestuff

Status
Not open for further replies.

Ploeperpengel

academic precarity
Joined
Feb 2, 2006
Messages
4,748
Location
Berlin
I thought we should have a seperate thread about the gamemechanics related to magic rather than discussing everything in the brainstormthread for it.


@Olleus-I know the code isn't finished just want to give detailed feedback:
Would you think it possible to have spellbooks set to DOMAIN_IMMOBILE and activly picked up by spellcasters?
Right now they can rebase and using the loadbutton for them and having to fortify them seems a little weird imo. They should be totally passive, the player shouldn't be able to do anything with them alone even not activate them. Rather than that the tooltip when putting the mousecurser above them should display all necessary detail(something like: "Book:Name of Spell, Can be carried by Spellcasters", "Token:Name of Spell, Can be carried by Spellcasters" and "Scroll: Dispel, Can be carried by Spellcasters"-Tokens I thought as replacement for civs which don't write books(Orcs) same effect just flavor).

Edit:
Some more magic feedback:
Commandment of Brass give an exception when cast on units inappropriate(like warriors):
Traceback (most recent call last):

File "CvScreensInterface", line 825, in selectUnit

File "CvSpellsInterface", line 108, in onUnitSelectSpell

File "CvMagicSpells", line 209, in CommandmentOfBrass

ArgumentError: Python argument types in
CyInterface.addImmediateMessage(CyInterface, str)
did not match C++ signature:
addImmediateMessage(class CyInterface {lvalue}, class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >, char const *)
ERR: Python function selectUnit failed, module CvScreensInterface

The player should get a notification if he's going to use a spell inadequate.

Damage is too low. A scorcerer can't barely wound a warrior with a fireball i.e. Best way would be making spell str editable in xml.
 
Making spell strength editable in XML would be a lot of extra work, as I would have to create a brand new XML file and all the code to read it and send it to python. I might do it later, but would rather not. At the moment spells do a set % of damage. I will change this to a set strength and a set amount of turns to battle with. That way, it will do more damage to low strength units.

I will look at the python error when I get home.

I had thought about making spell books totaly immobile but there are a few problems. First of all, you can't load a unit onto a boat if it is carrying other units. This means that spell books can't load into boats is they carried by a wizard. If they can't move, then they can't load either. This, however, can be fixed without too much problem.

The more serious problem is the AI. Right now, I have a spell book move to the closest available wizard. If they can't move, then wizards will have to move to collect them, and making this work propaly (including sometimes going back to a city to collect a better spell), is going to be very hard.
 
What about a simple getstring for iasset or ipower since we thought earlier that spellbooks should spawn from buildings and not be build I thinkt we could use those values to calculate str of the spell and players can't misuse it just to get better scores? No need to create a new tag this way.

About the hard part. I think it's not that pressing now but should still be done sometime after spells work with effects. Having an airforce of floating books really is more like Harry Potter than warhammer;) It just does look weird imo.
 
Well I can always fiddle around with the SDK to stop spell books rebasing, its should just involve a few extra lines. It is a very good idea to use the spell unit to store all the info for that spell. I will do this for the next version (along with adding sounds and animations). However, I would rather wait for warlords to do this as I do not particularly like the idea of doing the same thing twice.
 
Lord Olleus said:
Well I can always fiddle around with the SDK to stop spell books rebasing, its should just involve a few extra lines. It is a very good idea to use the spell unit to store all the info for that spell. I will do this for the next version (along with adding sounds and animations). However, I would rather wait for warlords to do this as I do not particularly like the idea of doing the same thing twice.
Yes sure I'm only talking warlotrds from now on anyway;) (except bugs maybe...)
If's not possible to change the system to load the books easily would it be possible to have a different actionbutton with another description(not load but something else-choose owner, master etc. you're the native speaker:p just to polish this a little, same with all other actiondescriptions like cargo i.e. that just doesn't fit for books, scrolls tokens)
 
I am not a native english speaker, although I have lived over half my life in England.

Making a new mission which is exactly like load but with a different name should be easy enough. In fact, I'm wondering if it couldn't be done in XML only. I will look into that.
 
French, I lived in france for most of my early childhood and all of my family (apart from parents + siblings) still live there.

We should really at least try to keep this thread on topic.
 
Ah now I finally know why it's napoleon as avatar:D

ok back on topic.

Apart from using items like books for spellcasting I'd possibly like to include natural abilities for some monsters, Elements and demons as well. That means they should be able to "cast" without books. Will this cause trouble with your concept?
 
Well, yes.
It would pratically destroy the entire way things are made. Sorry about that, but the fundemental assumption I made was that wizards would 'call' spells to cast its spell. There is no way I can go round this without recoding everything from scratch. Sorry about that.

Actualy, after thinking about this, I could add a new mission where the caster chooses itself as the spell book. This would actualy fit in quite nicely with what I have made already, on the codition that each monster, element and deamon can cast one spell only.
 
Lord Olleus said:
Well, yes.
It would pratically destroy the entire way things are made. Sorry about that, but the fundemental assumption I made was that wizards would 'call' spells to cast its spell. There is no way I can go round this without recoding everything from scratch. Sorry about that.

Actualy, after thinking about this, I could add a new mission where the caster chooses itself as the spell book. This would actualy fit in quite nicely with what I have made already, on the codition that each monster, element and deamon can cast one spell only.
I think I could live with that. That means not we can't add other passive abilities to them with different scripts right?
 
As long as its passive it will work.
Its just that other wise I would need to program a whole new mission type for every single spell. As doing that takes a bit over an hour + time to test, it would take for ever to do any reasonable number of spells. As it works now, the spells themselves are written in python, enabling me to add a spell and test it in under 20 minutes.
 
Status
Not open for further replies.
Back
Top Bottom