I have a quick question about the level editor. How do you make an arena?
INHALES
- You need to have two thangs named “Hero Placeholder” and “Hero Placeholder 1” with the right properties (programmable, plans, API, etc, just look at another arena)
- You need to set the level Type to “ladder” or “hero-ladder”: (hero-ladder is a bit weird, ask me if you have trouble) (EDIT: the problem was with hero-ladder, not ladder)
- You will probably need to set the ogres side to “playable” in the systems tab under “Alliance”:
- You will need to set up goals for each side to determine win conditions:
- You will need to create a referee thang to manage winning and setting up levels (probably other stuff too for certain arenas), and actually use the goal you set up earlier: (this is in a function win() which is called when the ref decides who wins; whatever hero is inputted into “hero” has its goals set to success and the enemy’s set to failure.)
how do you make the heros the crystal thingys?
and how do you give items to the heros?
Here read through this
how do you spawn items through the referee? and how do you use modulo in coffeeScript?
You can use @instabuild(“itemID”, x, y)
idk anything about coffeescript
what about giving items to heros? I can’t find it.
Like making them start out with items?
add the component inventory.equips to the hero and you can give it default items.
I meant the referee, sorry
and when I try to run the game, it shows this:
EDIT: before you ask, yes, I have set them to programmable already
On top of that you need programming.plans, and in the programmableMethods section of programming.programmable you need to add a method called plan with the default code for each language, as well as default AI code and permissions (idk what this does but it doesn’t seem to hurt; It might be to prevent hacking?)
Example from Desert Dispute:
It should just be the % symbol; I tested it and it works in the ref
Shhhh
I totally didn’t realize that the ref used coffeeScript it is so similar to python so I thought the arrow at the end of a defining a function was just a codecombat thing.
The crystal bases don’t work.
In the editor:
In playtesting:
Yeah that was the bug I talked about here:
add inventory.equips and then add an empty slot (fill it if you want; doesn’t matter) and it registers that it’s not supposed to be your equipped hero.
How can I change the summonable or buildable types?
add the existence.builds component, then add buildables, whatever name you choose for each unit type you specify will be what you need to use in the code.
Example: If I want to build a “warlock” I set the thangType to “warlock” and the name to whatever I want, but I have to use the same name to summon a “warlock”.
You can also use thangTemplate instead of thangType (it will override thangType) and place a unit of your own in the editor and then use that unit’s type (specified in programming.API) to summon it. This allow you to give units unique stats.
how do you allow the hero to summon/build without a boss star?
Just add the existence.builds component and do the same thing as before; if you want units to still cost gold, simply change the starting amounts and income of each team in the Inventory tab under systems.