Can please KB Be Updated ???
Sun, 2016-10-30 11:37
hi again,,,
i think in KB,,,
There are "Some" function "Which NOT [YET]" Documented or i say, exist there,,,
if i may ask,,, why there some "Hidden" (?) function that does not exist there ???
if can,,, please update it to its optimal, all present included function and codes documentation, especially in Core Lua API documentation
This is for scripting newcomers like me
The best option to add is "Example" of the function...
Like using onParameter, or using Cinematic (optionally)...
thanks and pardon if there something i say wrong
]{
╟───NW──────┼──────N╢
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
KB is currently updated manually. I'd love an automatic system like Doxygen. Too busy to do it myself.
My stuff
Do we have at least a Volunteer to update KB ???
Btw,,, FaTony's idea should be good too
Doxygen can be brought to Hedgewars ???
I Need more to learn there ;/
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
Well, some functions are undocumented because nobody documented them so far. Duh!
I would love if the developers would start to document their own code because they probably know best what their functions do. I know, I know, it is probably too much too ask, but just let me dream …
Here is the list of functions which are currently undocumented:
http://hw.ercatec.net/docs/lua_wiki_check.php
Note some of these functions are only available in dev version and not in release yet.
But most functions of the Lua API are already documented. The remaining functions are not as important. A few of the undocumented functions are actually just dummies which don't do anything (examples: CampaignLock and CampaignUnlock. Ignore them).
Hi, I am a Hedgewars developer.
OK, I just went through the current list of undocumented functions.
I recently added IsHogLocal and GetAmmoName to the HWKB.
The following functions are still undocumented:
- GetGearCollisionMask
- onSpecialPoint
- SetGearAIHints
- SetGearCollisionMask
- StartGhostPoints
- SetAmmoStore
After a discussion with nemo, I figured out that SetAmmoStore is just a poor man's version of SetAmmo. It is very unusual to use, you have to supply the full weapon scheme in this function and not a single script uses this function. I hope this function dies.
The *CollisionMask functions can be used to read and change the collision rules for any gear. For example, a bazooka could go through terrain and only collide with hedgehogs. Sadly, I don't know the exact syntax for these functions or the collision mask, so I don't know how to document them.
I have not really figured out the purpose of the remaining functions. Ask nemo or unC0Rr in IRC.
The following functions are currently just dummies which don't do anything and can be ignored safely (for now):
- CampaignLock
- CampaignUnlock
- DeclareAchievement
- onAchievementsDeclaration
Then there is EndLuaTest which seems to only be used internally by Hedgewars.
Hi, I am a Hedgewars developer.
Thank you Very Much to show us what function that still undocumented yet
Why most function are 'dummy' ??? Any reason for their life ??? [nvm]
Let me dream "When my little suggestion to add Wait, Stop, Music, Import Data, etc to be true "
Its could be Awesome see Hedgewars run brand new things on its little wheel and threads !!!
Imagine : "Futurhog" style that have futuristic weaponary by using scripts...
Then a "Ancienthog" style that is in same version of Hedgewars with 'Futurhog' but have different Weaponary
ETC...
Hmmm,,, I think i can't use them either XD for my current level...
So what the use of them ??? EndLuaTest ??? Its quite odd for me [only me x;]
Oh yeah that designed for devs...
Anyway,,, Thanks for it ... My Curious instinct [XQ] have fulfilled by see those biga functionera that i not even know what i use them S;
But...
I Realize Something :
idk,,, and this isn't important just another useless curious of mine...
Ok,,, Hope you can add more to the KB !!!
]{
╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜
I dug deep into the code and found the definition of collision mask:
CollisionMask: Word; // Masking off Land impact FF7F for example ignores current hog and crates
SetGearCollisionMask just takes a number. Now to find what number does what.
EDIT:
Apparently, SetGearCollisionMask(gear, 0xFF7F) doesn't work as expected.
EDIT2:
I figured it out with some experimenting.
Mask below 0xF makes gear go through everything.
Anything between 0xF and 0xFFF makes it hit only hedgehogs (not current one), barrels and mines.
Between 0xFFF1 and 0xFFFE it doesn't hit only crates and current hedgehog.
And 0xFFFF is normal collision.
Now, it seems like it's impossible to make something go through land, but not crates and barrels. It could be better if this mask was a bitmask, with each bit covering one collision type.
My themes / Theme Editor / Code contributions /
Dank