FindTheWay
Please login to see this attachment.
Description
A* Path Find, open source, 5X faster than Path Finding Object, planned for all runtime compatible.
Currently it's Windows only, I'll start porting when features are stable, aka finish beta.
This extension is still under development so if you find any issue or have suggestions, feel free to post here or open an issue Please login to see this link..
Please login to see this link.
Please login to see this link.
Note: You need a compatible version of visual studio with C++ 20 support, as I used concept in one place for fun. Even if you rewrite it by require, C++ 17 is still needed as I used structured binding declaration. X)
Please login to see this link.
Note: HTML in doc didn't display properly on GitHub, please download it and open with compatible editor.
Please login to see this attachment.
Free and open source
IMHO extensions, especially extensions that provide basic mechanisms, should be open-sourced, as it's frustrating to find some bug somewhere (or need some new feature) and the author may have left forum & lost source code, so it will never be fixed or takes a long time, you have to find a way to bypass bugs, even modify your game design, or implement it in another inefficient way.
Although I cannot make everyone share their source code, but at least I can start from myself.
A/C/E List
## Action
- Continue
- *This extension put find/calc area in condition to check if params area valid. If you don't need following actions immediately, use this action to avoid fusion remove the empty event*
- Set Stash
- *with this on, path & area will be stashed, then retrieve it with out calculate if states are the same (map/zoc/ignore flag, etc.)*
- *stash will be clear automatically once map updated*
- *disable stash will clear everything stashed*
- *disable this may slightly improve performance as the state hash process is skipped*
- *disable this if you encounter hash collision*
- Set Map
- Set Map
- Set Map By Object
- Clear Map
- Path
- Iterate Path
- Area
- Create Object Zoc
- *iterate zoc position for object, auto create zoc area, coord param is ignored*
- Create Object Zoc By Name
- *same as above*
- Create Object Zoc By Event
- *iterate zoc position for object, trigger `On Create Object Zoc` for you to create real zoc area*
- Set Zoc By Object
- Clear Zoc
- Set Unit By Object
- Clear Unit
- Iterate Area
- Create Area Once
- Create Area By Name Once
- Create AOE
- *Create different AOE area, check appendix for type declaration*
## Condition
- Map
- Map Available
- *extension maintains a internal class to handle everything. This class will be destructed then re-construct with new params in `Set Map` conditions. If params are invalid, those conditions will return false and all A/C/Es rely on this class will do nothing/return default value, use this to debug*
- Check Map Cost At Coord
- On Map Update
- *once you update terrain or dynamic, extension won't update the map immediately as you may set multiple points*
- *usually map is updated before find/calc area if needed, then this condition will be triggered*
- Set Map
- Set Map By Size
- Set Map By Base64
- Set Map By Picture
- Set Map By Collision
- *you can let extension retrieve collision of layers, or call `On Set Map By Collision` for each gird for you to check & set collisions directly*
- On Set Map By Collision
- Path
- Path Found
- Path Available
- On Iterate Path
- Area
- Zoc Valid
- *not at obstacle or unit*
- *need to update unit before using*
- Zoc At Area
- *check if zoc at calculated area*
- On Create Object Zoc
- Calc Area
- Line mode
- no obstacle from start to the range (e.g., laser beam)
- `allRange` & `allRangeAttackRange` are ignored in this mode
- if `attack` is true, `ignore flag` will be taken into account
- if `attack` is false, both map collision & all unit are taken into account, for skills that push/pull unit
- Ring mode
- if `allRange` is true, `range` will be used as move range, and `allRangeAttackRange` is used as maximum attack range, both move & attack area will be calculated in one short, e.g., danger zone of enemy.
- On Iterate Area
- On Iterate Attack Area
- *if you `Calc Area` in all range mode, this condition will be true when iterate attack area in `On Iterate Area`*
- Able to Iterate Area
- *if you want create areas procedurally by `Iterate Area` with param once, this condition is here for you to check if it is able to iterate.*
- Object
- Select
- Select All
- *save fastloops when click on an area, move character to that point, then destroy all areas*
- Object At Gird
- Object At Coord
- Object At Obstacle
- Object At Object
- *check if former object and the latter object has the same gird coord*
- Pick One Object At Object
- *only display one instance when overlapping itself*
- Non-Select
- No Object At Gird
- No Object At Coord
## Expression
- Iterate
- *this values are shared by all `On ...` events, please do not nest them*
- Get Iterate X
- Get Iterate Y
- Get Iterate Index
- Gird
- Get Gird Coord
- Get Real Coord
- Map
- Get Map Cost
- Get Map Base64
- Get Map String
- Get MapType Map
- Get MapType Terrain
- Get MapType Dynamic
- Get Map Cost Path
- Get Map Cost Obstacle
- Get Map Cost Valid
- Path
- Get Step
- the same as `Path Found` but return steps directly, save events when calculation AI
- Get Step of Path
- Get Step Coord of Path
- Area
- Get Ignore Flag
- *`ignore` means this point doesn't treat as obstacle*
- *A/C/E that requires this param need to update zoc/ally/enemy first to make ignore works properly*
- Get Available Line Range
Display More