Can please KB Be Updated ???

6 replies [Last post]
UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 13 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

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 Big Grin

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 Wink Smiley

]{

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

Lyberta
Lyberta's picture
User offline. Last seen 3 years 33 weeks ago. Offline
Joined: 2016-09-10
Posts: 177

KB is currently updated manually. I'd love an automatic system like Doxygen. Too busy to do it myself.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 13 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Do we have at least a Volunteer to update KB ???

Btw,,, FaTony's idea should be good too Big Grin
Doxygen can be brought to Hedgewars ???

I Need more to learn there ;/

]{

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

Wuzzy
Wuzzy's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 2012-06-20
Posts: 1301

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 … Big Grin

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. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 2012-06-20
Posts: 1301

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. Smile

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 13 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Thank you Very Much to show us what function that still undocumented yet Big Grin

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 Smile"
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 Big Grin ... 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 :

IRealizeSomethingOnDejaVu allegedly wrote:

Btw,,, do you a Devs [Go In/Modify/Create Object in KB] ??? I think you are a 'Legend of The Support' for Hedgewars that Contribute REALLY MUCH THINGS Here ;/ ... How can you Manipulate KB like Devs do ???
/// NOTE : _REGULAR USER CANNOT DO THIS_
Let me guess :
-- My Second Best Guess : Maybe You = A Developer
-- ABSOLUTE Sidecar Guess : You NOT An Hacker
-- You Overwhelm Coding so you can do anything here
-- You Set to be a KB's Organizer
-- You are the new 'Webmaster' [Respectfuly for Uriah]
-- My Best Guess : You Really Contributing for Hedgewars so devs let you [or Devs ask you to ?[or someone need a replacement?[?]]]

idk,,, and this isn't important just another useless curious of mine...

Ok,,, Hope you can add more to the KB Big Grin !!!

]{

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

KoBeWi
KoBeWi's picture
User offline. Last seen 3 days 20 hours ago. Offline
Joined: 2010-12-25
Posts: 564

Wuzzy allegedly wrote:
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 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.

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]