|
Post by xade on Oct 30, 2008 19:09:32 GMT -5
HTML is easy to break. If I was under fear, and the only options that I was give were P and W, it would be easy to change the webpage itself Bam - suddenly I'm passing back all kind of crazy entries, and without the server knowing to validate these entries - then the integrity is gone. It would need to be done in a way where new effects can potentially be added easy enough - and if we've got a handful of developers - even an open source thing - then the chances of non-development are greatly reduced. Off the top of my head, for a simple enchantment, you would need to write the validation code, the code to show which gestures to display and the code to display the casters interface. All of this should be seperate to the frame work, and the framework should expect it to be there.
|
|
|
Post by xade on Oct 30, 2008 19:15:56 GMT -5
It's not dead, just sleeping. The code is all still there. In fact, the java source is all available online at: code.google.com/p/spellcaster/It's not quite finished, invisibility/blindness isn't implemented, and monster interaction needs to be tweaked, and of course since I wrote the majority before I even found Warlocks it isn't an exactly replica of Warlock's implementation of the rules. I structured it more or less as you said, xade, except I made some bad decisions on where to place some code, mostly dealing with enchantments. I'd like to pull that code out of the 'actors' they affect and instead just call hooks there into the spells. The idea being that adding spells should not require code changes to the rules engine if possible. Part of my problem was not having a place to host my code. When Google made Google App Engine available I ported the engine from java to python to try it out. Got it working, but still need to tie in to google's 'BigTable' datastore, and then create the html for the UI. However, for the time being I'm in the middle of a big project at work and have no time to play with it. I probably won't be picking it up again until early next year. ps - Happy birthday!!!
|
|
|
Post by Slartucker on Oct 30, 2008 19:23:20 GMT -5
*whistles to self innocently*
|
|
|
Post by xade on Oct 30, 2008 19:44:26 GMT -5
*raises eyebrow*
|
|
|
Post by ExDeath on Oct 30, 2008 19:56:11 GMT -5
HTML is easy to break. If I was under fear, and the only options that I was give were P and W, it would be easy to change the webpage itself ... Off the top of my head, for a simple enchantment, you would need to write the validation code, the code to show which gestures to display and the code to display the casters interface. All of this should be seperate to the frame work, and the framework should expect it to be there. No, I think you're being way too paranoid about the power of user-defined spells. Using PHP, it is eminently possible to create a system that allows players to script their own spells without posing a security threat to the website. Forget enchantments, enchantments that change gestures are easy. But what if I wanted to code a new Permanency or a new Poison? Stuff like that, your API would need to be really advanced to allow. To create _truly_ custom spellbooks, it is necessary to allow the user complete freedom is designing his spells, the only boundaries being the code itself.
|
|
|
Post by xade on Oct 30, 2008 20:20:34 GMT -5
The whole thing needs to be done in a way where that is posible. However, I disagree that *anything* should be relying on client side scripts.
I think the code needs to be stuctured in such a way where the effects of each spell play a part in multiple ways - ie - you could potentially have code executing in the following sections
Validation Caster UI interface changes Target UI interface changes (The above is mostly for enchantments)
Turn Generation ? Haste/Timestop/what if someone wants to create a spell which turns the clock back three turns? Enchantment Resolution ? (When using perm - it is simply turning an Amniesia(1) effect into an Amniesia(0) - simple code in theory...) Damage Resolution ? (Timestop effects)
There a lot of thinking as to how to break it all down into part, so that it's posible to plug new things easily into it.
The main problem I have is there will always be the potential for inter-play within spells and effects, though without having the chance to think too deeply through it, I'm not sure how big a problem that will be...
|
|
|
Post by ExDeath on Oct 30, 2008 21:05:26 GMT -5
It's hard for me to relate my opinions in a way that would be understood by everybody. If you think of it like Magic or some other CCG, there is a basic set of rules, but one of the most basic rules (this is actually in the rulebook) is essentially: "The rules on the cards may change these rules at any time.". Would it be possible to create a comprehensive and enjoyable game without this rule? Without letting the spells contradict and create the rules? Yes, but it's not the best way. We're not talking about client-side PHP "scripts", we're talking about inventing a new language for the API so that the spell Permanency could be structured as follows:
Spelltype="Persistent" Target="Self" Duration=3 Charges=1 (The above is all graphical, then there's a box to enter unique code:)
int permhand = ChargeUsed("Permanency"); if (permhand > 0 && CastSpellType(permhand, "Enchantment")) { SPELL_DATA* permspell = GetSpell(permhand); permspell.duration = -2; permspell.override = TRUE; } else if (permhand > 0 && !CastSpellType(permhand, "Enchantment")) { SendError("You cannot make that spell permanent."); return FALSE; }
Since all of the functions are written specifically for this new scripting language, there is no real potential for abuse. You will end up with people monkeying around with the code who don't know what they're doing, sure, but you'll get that with the API anyway.
|
|
taliesin
Ronin Warlock
Grand Master
Posts: 156
|
Post by taliesin on Oct 30, 2008 21:17:47 GMT -5
I'm going to assume, ExDeath, that you're talking about what's primarily a testing framework for new spells and new spellbooks. On that basis it sounds reasonable.
I think everyone else is assuming that you're talking about a framework for players to use once the game is up and running. Now, of course it would be crazy to let people write their own spellbooks for the game outside those produced by the designers, of course, much as it would get absurd if you handed an experienced Magic player a bunch of cards and told them they could write the effects they desired on them. That's a much, much bigger issue than them passing back nonsense to the server; creating a one-gesture FoD trumps lying about gestures big time.
However, creating and balancing new spellbooks against each could prove to be an entertaining project for a number of people. The more spellbooks you have, the more balancing will be required, of course, but a rapid means of changing spell effects could greatly speed evolution towards the final goal.
|
|
|
Post by nawglan on Oct 30, 2008 21:19:45 GMT -5
Well, here's what I have planned for custom spellbooks. This will all be done via a web interface. - You will be able to provide a list of resist types, which your spells will be able to use.
- You will be able to provide a list of damage types. This applies to spells and monsters.
- You will be able to provide a list of restricted gesture sets. These will be used in cases like maladroit and amnesia but with more options.
- You will be able to provide a list of monster chat lines.
- You will be able to set the starting health of players.
- You will be able to set the number of starting players (within a given range, for sanity).
- You will be able to build a set of spells.
- You will be able to set the hidden gesture character (chosen from the full set of gestures)
- You will be able to customize the monsters
- You will be able to customize the monster name prefixes, will be picked randomly from this list upon monster creation.
Formatting for monster chatter: %r = random player name %m = random monster name %o = random opponent monster %s = random controller monster name %t = target's name %n = monster's name %c = controller's name # random_monster_chatter = [ "Hahaha! I will smash %t", # "You shall never defeat %n!!" ];
I added a few gestures for system use only: CDPSFW : standard gestures, uppercase only. - : no gesture > : stab + : maladroit % : random gesture (ie, confusion, if used as a spell gesture acts same as *) ^ : any gesture except the previous gesture opposite hand* @ : any gesture except the previous gesture same hand* ! : any gesture except the previous gesture on either hand* * : any gesture < : previous gesture* | : previous gesture opposite hand* = : previous gesture either hand* [0-9] : restricted gesture set index
* Prevents the spell from being the first spell in an opening if the spell gesture list starts with one of these. These will be used for restricted gesture sets, etc. For example: Fear: CFDS>- Confusion: % Amnesia: < Maladroit: + Can have 10 of these, they are stored in order and referenced in the spell affects by index (0 through 9, might expand this to include lower case letters if needed) Spells have the following properties: - rank (affects order spells are applied, must be unique)
- name
- type (Magical, Physical, Enchantment, Other - for special hand crafted spells)
- List of targets (Opponent Self Target Nobody Random) Yes, this allows you to hit the target multiple times or random target twice, etc.
- List of affects (explained below)
- List of spells, by name, that the spell blocks (ie, counter spell. keyword 'all' for blocking all spells)
- List of dmg types it blocks
- List of spells, by name, the spell can be cancelled by (made null, as if never cast)
- gesture list for a single hand [CDPW]
- gesture list for opposite hand [C***] Must be same length as single hand. Yes, this allows half claps, stabs, null gestures, same gesture as before... the whole schebang
- default target (Random, Opponent, Nobody, Self, All)
- text line displayed if you are visible
- text line displayed if you are invisible
Affects have the following properties: - disrupt target (LH, RH, BH)
- changes regex /from/to/ both sides must be equal length, and are processed in order. (/WPD/SFW/ = W->S, P->F, D->W
- duration (integer, -1 for infinite, 0 for instant, pos num for num of turns after becoming active)
- dmg type
- adjust health amount (integer, negative for dmg, positive for healing)
- monster it creates
- special type
special types (integer) - 0 - None (default for all spells)
- 1 - reflect
- 2 - invis
- 3 - blind
- 4 - death timer (if affect duration is 0, like FoD, if duration is negative, no effect, positive duration is number of turns player has to remove it.)
- 5 - use once
- 6 - charm
- 7 - surrender, must have one spell in the spellbook that has this as an affect. Can only be used on spells that default to self and only targets self on all affects.
- 8 - remove enchantment
- 9 - haste
- 10 - permanency
- more as I encounter them and as special cases to reflect RB's setup.
Monster properties: - name (will be prefixed)
- dmg type
- dmg amt (negative for dmg, positive for healing)
- health (positive int)
- controllable (true / false)
- default target
|
|
|
Post by nawglan on Oct 30, 2008 21:25:23 GMT -5
Idea was to make it possible to have a spell that heals you, but if you have a resist of it's type up you'd resist it. Also allow spells like chain lightning, it's possible to make a permanent spell that summons a monster every turn. It's possible to have a spell that does multiple things to different targets (sets a 3 turn fod timer and heals you and all of your pets to full health, etc.) I have most of the code for the spellbooks done. Am in process of adding RB's setup. Then, I'll work on the web interface to make creating these easier. After that, I have planned a game engine that allows me to store (in a new and improved archive) every aspect of the game: - What you initially enter as a gesture (not visible if you were invis, but I want to store it for AI purposes)
- warlock hand targets
- monster targets
- chat lines (including hidden channel chats, allowing hidden chat for teams, guilds, personal reminders, etc. will only be seen in the archive by those members unless the individual comment is specifically marked as public.)
as far as the server goes. Was thinking of only allowing you to be in a single guild at a time. But you could be in as many teams as you want (might have to set a limit). Teams and guilds can be set as having private members, though the public interface will show some stats. If a team/guild has private members, they will be assigned a name by the server when they join a game. It will change for each game and will only be visible in the archive if marked visible. The archive will allow for annotations by approved people (each player can annotate their moves, as well as players chosen for their insight). I'll keep track of most of the stuff I already keep track of in the current archive, and plan to add the current archive to the new one once I get a parser written and the db layout finalized. Would also like to have a forum for discussion about the game too, open to posts by other players. Ambitious plan is to archive everything, complete with periodic backups. Every player, formal team, formal guilds, will be allowed to have a few spellbooks. Tournaments will be able to pull from any of these as selected by the tournament administrators. So, if you have one designed and well tested, petition an admin and they will add it to the available list. Was thinking of allowing players to enter automatically generated tournaments. They would allow up to N players and would run a set way (swiss? *shrug* some method that can be coded easily and is fair like round-robin). As you join, you get to pick a spellbook. The tournament will randomly pick one.
|
|
|
Post by Slartucker on Oct 30, 2008 21:44:34 GMT -5
If you think of it like Magic or some other CCG, there is a basic set of rules, but one of the most basic rules (this is actually in the rulebook) is essentially: "The rules on the cards may change these rules at any time.". Would it be possible to create a comprehensive and enjoyable game without this rule? Without letting the spells contradict and create the rules? Yes, but it's not the best way. Actually, that rule is NOT on the magic rulebook anymore, and hasn't been for some time, although it made its way into a number of other CCGs that copied it from magic. Instead, the Comprehensive Rules expand with each new release to make sure that all new mechanics and new cards interact smoothly with all other components of the game. I think the original rule was something like "If a card contradicts the rules, the card is always right." If this rule were rephrased for the current system, it would say "Cards do not contradict the rules."
|
|
|
Post by xade on Oct 30, 2008 22:16:44 GMT -5
It's tricky. I mean, effects - new custom effects, will need to be coded in.
I can see what your thinking of Ex, but from a sheer body-of-work VS benefit, I don't think it would be worth it.
Naw, don't forget - allow for multiple damage/resistance types.
Fire Elements attack with both Fire AND Physical damage, and you only need one of these resistances to stop it.
|
|
|
Post by nawglan on Oct 30, 2008 22:23:42 GMT -5
No, they attack with fire damage of -3. Just need to allow P, WWP, WPP, etc. to block that dmg. I'll add that to the blocks list for spells.
|
|
|
Post by xade on Oct 30, 2008 22:26:09 GMT -5
No, they attack with fire damage of -3. Just need to allow P, WWP, WPP, etc. to block that dmg. I'll add that to the blocks list for spells. So there will be a difference between attack fire damage and spell fire damage? What if I want to create a spell that deals 2 cold damage and 2 fire damage?
|
|
|
Post by nawglan on Oct 30, 2008 22:31:21 GMT -5
one thing I'm thinking of is shield health. So you can weaken a perm shield (player with the perm shield could then cast P to "heal" it).
Would basically end up being an affect health. with possibility of refreshing them.
|
|