EGOBOO -- Another editor

The development of the game itself or new resources for it. Any new stuff you're working on would go here, as well as the discussion of in-development stuff.

Moderator: Developers

User avatar
Agent of Dread
Protector (Senior Member)
Protector (Senior Member)
Posts: 8991
Joined: Wed Jul 23, 2008 8:46 pm
Location: Australia
Contact:

Re: EGOBOO -- Another editor

Post by Agent of Dread »

Ohhh, so you're suggesting they become like the SoulFu shops? That's not actually a bad idea.
- Linktree: linktr.ee/trilbs -
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

it's only a matter of diligence :D
Another change:
SAVEGAME
directory 'savegamedir' (can be set in conficuration file)
spawn%02d.txt - Characters object name and Game_Name and its inventory objects
char%02d.txt - NEW file type Saved values of game character, overrides the character profile
(replaces 'import' and 'export')

Question:
There is a global object 'globalobjects/book.obj', SPELLBOOK, which is loaded by fixed name into a fixed slot. Is there something special about I have to observe about that ?
I think that could be replaced by using the objects name instead of its slot number. Is that correct ?
And can somebody explain me how spells work at all ?

Additional info about code struct:
The AI hasn't to poll anymore, it gets a message, if an 'ALERTIF_' happens.
Last edited by bitnapper on Sun Jan 06, 2013 1:20 pm, edited 1 time in total.
Two beer or not two beer... rather a malt whisky
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

All spells can have their own unique model (for summoning a monster for example or polymorphing). To make spell objects look like spell books they use special BecomeSpellBook which transforms them into the hard-coded spell book object when dropped. When they are grabbed they have a BecomeSpell function that transforms them back from spell book to spell form.

It's rather over complicated.
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

So how about to make a new 'spell-management' ?
Suggestion:
- New 'spells' directory.
- Each spell is written in scripting language
- The name of the text file is the name of the spell (as it is with game objects)
- Spells could be bound trough IDSZ (e.g [SPEL] %SPELL_NAME) to a character or a particle
- Example for character: A wand which has a spell bound to it and the 'ammo' is the maximum of spells you
can carry out before it's used up
- The spell script is exectued as its target is hit
- For learned spells, the characters game-profile is extended by an array of 'MAX_SPELLS'
- At lower levels, the character has to have a book in hand to cast a spell
- 'Thrown' spells are executed as flying particles
- E.g 'Summoning a monster' is scripted as "SpawnObject([%object_name]);
Two beer or not two beer... rather a malt whisky
User avatar
Shade
Potion Mimic (Senior Member)
Potion Mimic (Senior Member)
Posts: 7349
Joined: Thu Jul 24, 2008 12:25 pm
Location: Gensokyo

Re: EGOBOO -- Another editor

Post by Shade »

Trying to make Egoboo more like other games again, I see
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

Shade wrote:Trying to make Egoboo more like other games again, I see
Primarily I think about building new maps easier and add new possibilites like spells and effects with not too much hassle.

I still see Egoboo as a some 'Hack and Slay' game in the first place with a touch of RPG.
IMHO there are different player types:
- Players which play a module occasionally for fun and choose it by menu
- Players which want to play the Story following the 'Quests'
- Players who want to play together hotseat and ower network

IMHO the rules should be simple: Killing enemies and solve puzzles gives you experience, experience gives you higher levels, which add to your hitpoins and mana and maybe some special skills which makes it easier to win other modules.

I try to make the best of it and keep it as 'Egobooish' as possible.

For the next few days I'll be grepping... :)
Two beer or not two beer... rather a malt whisky
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

Yes. Don't worry Shade except the "At lower levels, the character has to have a book in hand to cast a spell" nothing in that list should change in the game itself from what is Egoboo. (not sure what bitnapper meant by that though)

The only things these changes provide is easier modding or creating new content for developers. It also reduces chance of bugs because all spells would be standardized. Other small benefits would be scrolls can contain any spell (no need to create a new scroll object for each spell type) and same with wands really. It would be very easy for example to create a Wand that casts a random spell (much less work than Wand of the Jester I created a while back).

If you are serious about networking, then I would think about implementing it early on instead of first implementing single player only. Designing the game in a Client/Server system is much easier than porting a single player to network. (In other words a Single Player game is a Network Server where only the Local player(s) can join - so basically you are networking with yourself :P). I think I would still recommend ENet for Egoboo (simple, free and written in C).
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

zefz wrote:(In other words a Single Player game is a Network Server where only the Local player(s) can join - so basically you are networking with yourself :P)
I could need some help how to attach networking (Add Players/Start Game). Is there some template code available ?
I plan handle it that way: A network player is just another input device. The only difference is that it it has to send the results of the input to the device...

Just for information:
From today the porting speed will be a little bit slower, because I'm back to work again :)
Two beer or not two beer... rather a malt whisky
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

The ENet website has some simple tutorials how to get network communication working in 1, 2, 3:
http://enet.bespin.org/Tutorial.html

If you want to keep it all SDL then there is also SDL_Net which has some documentation here: http://jcatki.no-ip.org:8080/SDL_net/SDL_net_frame.html and example code here: http://jcatki.no-ip.org:8080/SDL_net/demos/

I would recommend using UDP for an action game like Egoboo (ENet is pure UDP while SDL is TCP and UDP). I know ENet supports in-order and reliable packet transfers which is very nice to have.
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

@zefz:
First thanks for the info. At the moment I switch between porting game functionality and adding new possibilities to the editor. The game functionality is ported first as minimal functionalitiy. Physics and scripts will be the last.

I think, there is no need for an editor part for the simple files like 'messages.txt' and 'alliance.txt'.
BTW: For editing text files I use Notepad++. It supports syntax highlighting. It should be possible to add a new description file for the egoboo script, having syntax highlighting for it too.

New questions:
Could you give me please some Info what possibilities a Script for a spell should have ?
E.g. are particles to be spawned as visible 'effect' ? And how should/could this particles be asssigned to the spell ?

I have some ideas for the basic struct how to solve it.
There are tree possible script functions for a spell:
- At start (As the spell is cast)
- If a target is hit (Effects target with the casters 'strengths': Damage/Heal whatever)
- If a wall is hit (Just to show that te spell is stopped e.g a 'Fireball'-Spell)
Two beer or not two beer... rather a malt whisky
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

Couldn't you just use the spells we have now, but change the scripts? It shouldn't be too hard to fit them into your idea :| (like they can share the same ai alerts save IfTimeOut but have different states/contents)
...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

Spells usually just spawn a particle (part0.txt to part7.txt) and the particle itself handles the rest of the effects (spawn particle on hit wall... spawn particle when moving, how it should move etc.).
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Re: EGOBOO -- Another editor

Post by penguinflyer5234 »

(in 2.9.0, it's actually part0.txt to part12.txt)
...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: EGOBOO -- Another editor

Post by Zefz »

Yes, it should ideally be dynamic... so any number of part*.txt should work.
User avatar
bitnapper
Tome Mimic (Module Baker)
Tome Mimic (Module Baker)
Posts: 135
Joined: Fri Jan 30, 2009 3:33 pm
Location: Somewhere near the alps
Contact:

Re: EGOBOO -- Another editor

Post by bitnapper »

penguinflyer5234 wrote:Couldn't you just use the spells we have now, but change the scripts? It shouldn't be too hard to fit them into your idea :| (like they can share the same ai alerts save IfTimeOut but have different states/contents)
Why not? I did read some of the spell scripts (fireball i think) and didn't have any idea what it's effect at all.
And, BTW, what is the 'enchant.txt for :? ?

About the thing with the book: I have some ideas about it. It could be solved by the spells 'class' flag in 'data.txt'. If this class was an object, then the spell could actually be dropped as this kind of object.
I personally prefer the spells bound to a book, a scroll or a wand (using class to share the same object) for display. Simplified said: The object casts the spell (it's the objects script) and has the additional effects of the caster, which has the object in hand.
I think, the actual solution is about to have the same model for display (the book) for different spells.

It could be solved another way in the 'spawn.txt' file:

Code: Select all

[object] : [spell-name] 
The 'Name' column is initialized with 'NONE' anyway. In this case the object is loaded as yet for display of the object (use this model) and the spell-name is used to load the usage-data, the script and the particles for the spell.

Anyway, I think that the game mechanicsshould be separated from the code which displays the results of the changes in the game. There's also a hassle that there is the same bunch of data independent of it's type. E.g. an item can be described with much less data and is handled different in game anyway.

SVN:
I added dome new code and did some more reformatting
Two beer or not two beer... rather a malt whisky
Post Reply