Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDB Parser #23

Open
hogsy opened this issue Jun 30, 2022 · 0 comments
Open

GDB Parser #23

hogsy opened this issue Jun 30, 2022 · 0 comments
Labels
anachronox feature Indicates that this is a requirement to meet the feature-set of the original game. enhancement New feature or request

Comments

@hogsy
Copy link
Owner

hogsy commented Jun 30, 2022

Fairly simple format which seems to be used for specifying various items and their properties, levels, quests

  • // denotes a comment
  • #<type> <name> denotes an instance, with name being the rest of the length of the line (?) or up to the brace
  • <var> <var_type> <value> is the format for specifying variables, I'd figure these can only exist under an instance declaration

Generally, syntax looks like this.

// Example comment
#<type> <name>
{
<var> <var_type> <value>
<var> <var_type> <value>
<var> <var_type> <value>
}
#level rowdys
{
	masterlevel	float	1
	xp_levels	float	.5
	xp_battles	float	0
	quest_1		string	"Fatima Stop"
	quest_2		string	"Get Your Camera"
	quest_3		string	"Get Some Money"
	quest_4		string	"Use Time Minder"
	quest_5		string	"Talk To Valesta"
}

At the top of quest.gdb the following information is provided. This doesn't seem to necessarily be entirely up-to-date but it's still helpful.

//
//=================================================
// QUEST.GDB
//=================================================
//#quest <name>
//{
//   description
//     desc string "<Description of the quest>"
//   experience awarded upon completion:
//     xp   int    <value>
//   When completed, the next sub-quest can continue with:
//     next_quest string  "<name>"
//   When completed, this APE sequence callback will be triggered
//     quest_callback string "<sequence>"
//   When this quest is added, the following sub_quest will also be added //immediately
//     sub_quest string "<sub_quest>"
//     @@@ OBSOLETE!!!! Gamevar expression to indicate that the quest is done:
//     @@@                   requirement string "<expr>"
//}
// QUEST COMMANDS
// extern add_quest "The Name of The Quest"
// extern complete_quest "The Name of The Quest"
// extern cancel_quest "The Name of The Quest"
// extern is_quest_done "The Name of The Quest" GAMEVAR
//is_quest_done will check to see if you've finished the specified quest, and return
//a value to the GAMEVAR specified. All successfully finished quests will return 2,
//a quest "in progress" will return 1 and a quest you haven't received will return
//0. NOTE that this can be kinda expensive to check, so it shouldn't be used to check 
//every frame if the status of a Quest has changed from 1 to 2, or something like that.
//Use this call with care, and stick to checking the normal gamevars when possible.

On more specific stuff, I'm not yet entirely sure. For example, I'm not sure if the name supplied for #level gets matched up against the name of the bsp or is just referenced by scripts. I'm also not so sure how it works in line with the following comment.

// NOTE: some levels may have more than one configuration.  This is
// useful in cases such as the Bricks where the area will undergo a
// change throughout the course of the game, and its monsters / quests
// / masterlevel / XP distribution will be different the second time
// around.
@hogsy hogsy added enhancement New feature or request anachronox feature Indicates that this is a requirement to meet the feature-set of the original game. labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anachronox feature Indicates that this is a requirement to meet the feature-set of the original game. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant