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
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 »

You need either Visual Studio 2010 Express or MingGW (look at TDM-GCC 4.7.0). If using the latter then CodeBlocks is a nice code editor (and can import sln project files).

Getting linking to work is usually a bit of work though. I think bitnapper has been nice and tried to link as little external libraries as possible.
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 »

This is the list that is generated by the editors loader for the 'griffin' 'spawn.txt'-file:
Spoiler:
[code]
Character: PLAYER 1
Character: PLAYER 2
Character: PLAYER 3
Character: PLAYER 4
Character: stairs
Character: table
Character: table
Character: lpotion
Character: deadbody
Character: haypile
Character: cinquedea
Character: rack
Inventory 'L': spear
Character: rack
Character: guard
Inventory 'R': gshield
Inventory 'L': spear
Character: guard
Inventory 'R': gshield
Inventory 'L': sword
Character: guard
Inventory 'L': sword
Character: guard
Inventory 'R': gshield
Inventory 'L': spear
Character: guard
Inventory 'L': lbow
Character: prisoner
Inventory 'L': cinquedea
Character: prisoner
Inventory 'R': ironball
Inventory 'L': pstiletto
Character: prisoner
Inventory 'R': tshield
Inventory 'L': cinquedea
Character: prisoner
Inventory 'L': ninjastars
Inventory 'I': knife
Character: switch
Character: switch
Character: switch
Character: switch
Character: gate
Character: gate
Character: gate
Character: gate
Character: deadbody
Character: chair
Character: chair
Character: chair
Character: table
Character: haypile
Character: haypile
Character: haypile
Character: prisoner
Inventory 'R': ironball
Inventory 'L': knife
Character: prisoner
Inventory 'R': kiteshield
Inventory 'L': sword
Character: prisoner
Inventory 'R': ironball
Inventory 'L': gshield
Character: lumpkin
Inventory 'R': gshield
Inventory 'L': gshield
Character: haypile
Character: haypile
Character: haypile
Character: crate
Character: barrel
Character: barrel
Character: crate
Character: crate
Character: crate
Character: powbox
Character: mimic
Inventory 'I': %RANDOM_SCROLL
Character: chest
Inventory 'I': %RANDOM_POTION
Inventory 'I': gshield
Inventory 'I': %NORMAL_TREASURE
Character: prisoner
Inventory 'L': pstiletto
Character: prisoner
Inventory 'R': knife
Inventory 'L': knife
Character: cobol
Inventory 'L': spkmace
Character: cobol
Inventory 'R': ironball
Inventory 'L': whip
Character: cobol
Inventory 'L': longbow
Inventory 'I': knife
Character: cobol
Inventory 'R': kiteshield
Inventory 'L': knife
Character: prisoner
Inventory 'L': spkmace
Character: chest
Inventory 'I': %RANDOM_WAND
Inventory 'I': %RANDOM_POTION
Inventory 'I': %RANDOM_POTION
Character: lumpkin
Inventory 'R': ironball
Inventory 'L': sword
Character: lumpkin
Inventory 'L': gonne
Inventory 'I': keyc
Character: cobol
Inventory 'R': ironball
Inventory 'L': cinquedea
Character: prisoner
Inventory 'L': whip
Character: barrel
Character: crate
Character: powbox
Character: lumpkin
Inventory 'L': sword
Character: lumpkin
Inventory 'L': sword
Character: lumpkin
Inventory 'L': sword
Character: lumpkin
Inventory 'L': ninjastars
Character: lumpkin
Inventory 'L': sword
Character: bosslumpkin
Inventory 'L': gonne
Inventory 'I': whip
Inventory 'I': bomb
Inventory 'I': keyc
Character: chest
Inventory 'I': %RANDOM_POTION
Inventory 'I': gonne
Inventory 'I': keya
Character: sandtroll
Inventory 'I': keya
Character: deadbody
Inventory 'L': cinquedea
Character: deadbody
Character: deadbody
Character: deadbody
Inventory 'L': cinquedea
Character: deadbody
Inventory 'L': lbow
Character: deadbody
Character: deadbody
Inventory 'L': sword
Character: deadbody
Character: deadbody
Inventory 'L': whip
Character: deadbody
Character: table
Character: chair
Character: chair
Character: bosscobol
Inventory 'R': tshield
Inventory 'L': pstiletto
Inventory 'I': keya
Character: cobol
Inventory 'L': cinquedea
Character: cobol
Inventory 'L': cinquedea
Character: cobol
Inventory 'L': cinquedea
Character: cobol
Inventory 'L': cinquedea
Character: cobol
Inventory 'L': lbow
Character: cobol
Inventory 'L': lbow
Character: table
Character: chair
Character: crate
Character: mimic
Inventory 'I': keyc
Inventory 'I': %RANDOM_SCROLL
Inventory 'I': %RANDOM_ARCANE_SPELLBOOK
Character: prisoner
Inventory 'L': ninjastars
Character: lumpkin
Inventory 'R': ironball
Inventory 'L': sword
Character: cobol
Inventory 'R': ironball
Inventory 'L': whip
Character: chest
Inventory 'I': %RANDOM_POTION
Inventory 'I': %RANDOM_POTION
Inventory 'I': %NORMAL_TREASURE
Inventory 'I': %NORMAL_TREASURE
Character: gate
Character: gate
Character: switch
Character: switch
Character: haypile
Character: powbox
Character: powbox
Character: powbox
Character: powbox
Character: deadbody
Character: chair
Character: switch
Character: switch
Character: gate
Character: gate
Character: prisoner
Inventory 'R': ironball
Inventory 'L': spear
Character: prisoner
Inventory 'R': ironball
Inventory 'L': spear
Character: prisoner
Inventory 'L': spear
Character: cobol
Inventory 'R': ironball
Inventory 'L': lbow
Character: cobol
Inventory 'R': kiteshield
Inventory 'L': spkmace
Character: lumpkin
Inventory 'L': sword
Character: keyc
Character: haypile
Character: haypile
Character: haypile
Character: haypile
Character: chest
Inventory 'I': %RANDOM_ARMOR
Character: table
Character: chair
Character: table
Character: chair
Character: crate
Character: mushroom
Character: gate
Character: switch
Character: rack
Inventory 'R': lbow
Inventory 'L': spear
Character: table
Character: table
Character: deadbody
Character: lpotion
Character: gate
Character: switch
Character: rack
Inventory 'R': sword
Inventory 'L': spkmace
Character: lockdoor
Character: lockdoor
Character: lockdoor
Character: bargel
Inventory 'R': bind
Inventory 'L': burn
Inventory 'I': bdiary
Character: healer
Inventory 'L': spkmace
Character: prisoner
Inventory 'R': kiteshield
Inventory 'L': whip
Character: prisoner
Inventory 'L': spear
Character: prisoner
Inventory 'L': ninjastars
Character: gate
Character: chest
Inventory 'I': %RANDOM_ARMOR
Inventory 'I': %RANDOM_SCROLL
Character: chest
Inventory 'I': %NORMAL_TREASURE
Inventory 'I': %RARE_TREASURE
Inventory 'I': %RANDOM_DIVINE_RUNE[/code]
In this case 275 character slots are used. So a buffer for 500 characters should be enough to load further characters 'in game' by script. :)

The characters are loaded with consecutive numbers. Numbers 1 to 4 are reserved for the startings points 'PLAYER 1-4' to be overridden by the character profiles loaded from the export ('savegame'). 'unknown' characters are skipped. 'L'eft hand is the first slot in the inventory (as described for 'mounts').
For these 275 characters 58 character profiles (with models) are needer to load. The actual maximum set is 100.
For the purposes, only the object names are copied to the character profile.

Additional characters from the import would be loaded at the end of this list and put in the players inventory.

BTW: I found a bug in the code for random treasure. The Leading '%'-character isn't skipped for comparision with the titles of the random treasure lists.

I add some more code and test it before I do another upload to the SVN. Thats means to display the spawned objects decription including their inventory, if any.
Expect it to be Monday evening.
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 »

So a buffer for 500 characters should be enough to load further characters 'in game' by script.
Since you are using C++ why not use a Vector?
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 »

He's using pure C.

(btw, Egoboo 2.9.0 uses 512 for both profiles and objects)
...
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 »

Question:
Can a 'switch'-Character be attached to a passage with number 0 ? Like in the 'cellroom hall' in the 'griffin' module ?
If yes: How do I distinguish this from the passage number 0 used in other characters ? A value of 0 should mean no passage IMHO. How is that solved ?

BTW: Happy New Year to everybody! :D
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 »

Passage 0 is a valid passage number if I recall correctly. One could use -1 for no passage. But even if all objects use passage number 0 as default, it doesn't matter since only a few objects actually use passages.


I thought the editor was 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:I thought the editor was written in c++?
No, plain C. I was always too lazy to learn C++. :) But the code is kind object-oriented as it is now, I think. Not too much nested. Hold together what belongs together, don't uses 'extern' values. Minimal use of 'headers included in headers'. Well documented, too, I think.

SVN-Update
- 3D-Objects, characters attached to 3D-Objects
- New 'Tile-Info' code for later use with 'astar' and 'collision'
- Code to convert 3D-objects holding characters to 'spawn.txt' format (This could allow save games 'in module :))

And now enough worked for today. Again: I wish all of you a happy new year!
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 »

Ah pity :/ There goes my motivation to help with coding. I see no good reason starting with C again when rewriting parts of the game.

Happy new year yes ;)
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:There goes my motivation to help with coding.
:(

The Spawn-List in the griffin tower reduces to 159 visible objects, having 116 Items in inventory.
And this is how the 'spawn.txt' file looks generated by the editor:
Spoiler:
[code]
//File generated by EGOBOO - Map Editor V 0.2.0
PLAYER 1: NONE 1 76.50 42.50 2.00 N 0 0 0 0 0 T T G
PLAYER 2: NONE 2 76.50 42.50 2.00 N 0 0 0 0 0 T T G
PLAYER 3: NONE 3 75.50 40.50 2.00 N 0 0 0 0 0 T T G
PLAYER 4: NONE 4 75.50 42.50 2.00 N 0 0 0 0 0 T T G
stairs: NONE 5 76.50 41.50 1.50 N 0 0 0 0 0 F T N
table: NONE 6 63.50 44.50 1.00 N 0 0 0 0 0 F T N
table: NONE 7 65.50 37.50 1.00 N 0 0 0 0 0 F T N
lpotion: NONE 8 66.00 38.00 1.00 N 0 0 0 0 0 F T N
deadbody: NONE 9 64.50 43.50 1.00 N 0 0 0 0 0 F T N
haypile: NONE 10 64.00 40.00 1.00 N 0 0 0 0 0 F T N
cinquedea: NONE 11 65.00 40.00 1.00 N 0 0 0 0 0 F T N
rack: NONE 12 75.25 44.75 0.00 N 0 0 0 0 0 F T N
spear: NONE 13 0.00 0.00 0.00 L 0 0 0 0 0 F T N
rack: NONE 14 75.25 38.25 0.00 N 0 0 0 0 0 F T N
guard: NONE 15 68.00 42.00 1.00 N 0 0 0 0 0 F T G
gshield: NONE 16 0.00 0.00 0.00 R 0 0 0 0 0 F T N
spear: NONE 17 0.00 0.00 0.00 L 0 0 0 0 0 F T N
guard: NONE 18 65.00 45.00 0.00 N 0 0 0 0 0 F T G
gshield: NONE 19 0.00 0.00 0.00 R 0 0 0 0 0 F T N
sword: NONE 20 0.00 0.00 0.00 L 0 0 0 0 0 F T N
guard: NONE 21 65.00 41.00 1.00 N 0 0 0 0 0 F T G
sword: NONE 22 0.00 0.00 0.00 L 0 0 0 0 0 F T N
guard: NONE 23 73.00 43.00 2.00 N 0 0 0 0 0 F T G
gshield: NONE 24 0.00 0.00 0.00 R 0 0 0 0 0 F T N
spear: NONE 25 0.00 0.00 0.00 L 0 0 0 0 0 F T N
guard: NONE 26 73.00 38.00 2.00 N 0 0 0 0 0 F T G
lbow: NONE 27 0.00 0.00 0.00 L 0 0 0 0 0 F T N
...
gate: NONE 268 10.00 36.00 1.00 N 0 0 14 0 0 F T N
chest: NONE 269 8.50 41.50 1.00 N 0 0 0 0 0 F T N
%RANDOM_ARMOR: NONE 270 0.00 0.00 0.00 I 0 0 0 0 0 F T N
%RANDOM_SCROLL: NONE 271 0.00 0.00 0.00 I 0 0 0 0 0 F T N
chest: NONE 272 11.50 41.50 1.00 N 0 0 0 0 0 F T N
%NORMAL_TREASURE: NONE 273 0.00 0.00 0.00 I 0 0 0 0 0 F T N
%RARE_TREASURE: NONE 274 0.00 0.00 0.00 I 0 0 0 0 0 F T N
%RANDOM_DIVINE_RUNE: NONE 275 0.00 0.00 0.00 I 0 0 0 0 0 F T N
[/code]
This is output from the code in my 'testbed', it will be in the next or a following SVN-Update

Another info about the code-base of the editor:
Its data- and event-driven, that means theres no polling, every object get a message if something is happening to it.
Two beer or not two beer... rather a malt whisky
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 »

Questions @zefz:

- What is the function of the slot 'PlayerAtTroll' in the 'spawn.txt'-file of the 'griffin'-module ?
- In the 'adventurer' module is a 'Player 0'. Then is there a '#dependency Advent 0'. In the archelogist module the first slot is called 'HERO'. Question: Is the first slot alway a player slot, no matter what it's name ? :?

BTW: Loaded up some more code for the editor. Prepared the display of the characters inventories.
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 »

bitnapper wrote:- What is the function of the slot 'PlayerAtTroll' in the 'spawn.txt'-file of the 'griffin'-module ?
If you uncomment it and comment out the original starting position instead, you'll spawn directly at the troll miniboss rather than the entrance. I imagine this is for debug/testing purposes and was as such only commented out, not completely removed, to make accessing this feature more convenient.
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 PlayerAtTroll is a spawn point at the Sand Troll to test his AI/balance without needing to walk through the entire module.

Slot 0 is always the player yes.
Prepared the display of the characters inventories.
How are you planning to handle inventory? Classic egoboo?
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: How are you planning to handle inventory? Classic egoboo?
In 'Edit-Mode' I plan to display the characters icon with the character profiles name.

In 'Play'-Mode it can be handled the new or the classic way. It depends on how the players input is translated.
E.g 'Loop' per hand trough inventory if inventory is closed, otherwise handle inventory using the mouse if the inventory is open.

BTW: I had an idea regarding the 'shop'-Handling: How about to have the shopkeepers inventory as the shops inventory? Thus no special 'shop'-passage would be needed. JUst extend the inventory slot by the price for the item(s).
Two beer or not two beer... rather a malt whisky
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Re: EGOBOO -- Another editor

Post by Cimeries »

bitnapper wrote:Thus no special 'shop'-passage would be needed.
Remember that the shop passage serves as a way to sell items too. How can the players sell items to the shopkeeper with what you have in mind?
:wink:
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 »

By dragging and dropping items into the shop inventory from the player inventory.

But yes, shop handling using passages was always a hassle in Egoboo.
Post Reply