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

How to use developer console? Needs docs? #1759

Closed
kevzettler opened this issue May 15, 2020 · 7 comments
Closed

How to use developer console? Needs docs? #1759

kevzettler opened this issue May 15, 2020 · 7 comments

Comments

@kevzettler
Copy link

I'm aware of the developer console from:
https://github.com/flareteam/flare-engine/wiki/Developer-Console

But the documentation is a bit lacking. I am aware there is a help menu with a few commands. It says you can execute events with the developer console and gives an example of a message event.

How do know what the other events are and the arguments they accept?

@dorkster
Copy link
Collaborator

The exec command uses the Event properties as commands. Here are a few more common examples:

# teleport to perdition harbor
exec intermap=maps/perdition_harbor.txt

# add a Health Potion to the inventory
exec reward_item=2,1

# gain 100 XP
exec reward_xp=100

# set a campaign status
exec set_status=my_status

# reset the character's XP, stats, skills to level 1
exec respec=xp

@kevzettler
Copy link
Author

thanks @dorkster I will add to the wiki

@kevzettler
Copy link
Author

@dorkster how do I know what event.type | string | are availble?

@kevzettler kevzettler reopened this May 15, 2020
@dorkster
Copy link
Collaborator

event.type is the same as npc.type and enemygroup.type. These keys are added to the corresponding objects when exporting a map in Tiled. The engine doesn't do anything with them (hence why the docs say they're ignored), but we check them in the parser as to not cause an "unknown key" error.

@kevzettler
Copy link
Author

@dorkster sorry I think I asked the wrong thing regarding event.type

What i really mean is where did you find that list of exec commands at:
#1759 (comment)

like where would I know I could use:
exec reward_item=2,1

is there a list of exec commands anywhere?

@dorkster
Copy link
Collaborator

The Event properties I linked above is essentially the list of commands. For example, if we look at this example in the documentation:

event.reward_item | item_id, int : Item, Quantity | Reward hero with y number of item x.

Translated to an exec command:

exec reward_item=item_id,int

You would replace item_id with the ID of the item you want to give the player, and replace the int with the quantity.

Many of the commands don't do anything by themselves, such as requires_status. You can string these commands together to construct complete Events by putting a space between each command. If the command would contain a space, you can wrap it in double quotes ("). Ex:

exec requires_status=my_status "msg=my_status is active"

Not all commands are supported. Here's a list of the ones that are not:

  • type
  • activate
  • location
  • hotspot
  • cooldown
  • delay
  • reachable_from

@kevzettler
Copy link
Author

Ok thank you for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants