Jump to content

Scripting Wiki wishlist


Recommended Posts

I often see comments about the scripting wiki missing information or wishing it was "moar betterer" without giving specifics. Use this thread to request which pages you want to see improved or created. Please limit it to scripting engine and mission making topics. 

https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation

  • Thanks 2

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 2 weeks later...

One thing I noticed when looking for a function by name, was, the routing of where to start.

I've got about four pages bookmarked, class functions, singleton functions, enums which are always useful https://wiki.hoggitworld.com/view/DCS_enum_weapon_flag and the tasking one. I find that finding things and navigating is hard on the site. So I don't I just try each page for a function not realising their differences.

For example. To find getResourceMap() and starting at the home page --> https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation
You need to know that getResourceMap() is in the Warehouse class to click --> https://wiki.hoggitworld.com/view/DCS_Class_Warehouse
Then this isn't a list of functions, in fact, its not listed as a member function? It's a static function, whatever that means and its lower on the page.

For idiots like me at least, a big bucket of functions would make more sense than different pages that don't make sense. Maybe just understanding why they are split could help me to find what I was looking for?

It probably makes sense to someone, and I don't have great ideas on a different way of doing it, so I apologise, but I think it's hard to navigate and find things.

  • Like 1

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

So this page?

https://wiki.hoggitworld.com/view/Category:Functions

Granted it mixes in gameGUI API functions. 

 

The "Static Function" naming comes from what the original documentation had for functions that are part of a class, but don't require the object in order to actually run and return data. For instance X.getByName is a static function since it returns the object. Similarly getDescByName() is the same as object:getDesc(), but getDescByName takes a string value to return the desc table. Warehouse.getResourceMap is the same way. It probably wouldn't hurt to add the static functions to the list of class functions for each class. 

  • Like 2

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

First, I greatly appreciate all the work you and others have put into those pages. THANK YOU!

Now, everything I write here is not criticism, but merely ideas to maybe improve this great work. I'll post whenever one of my (frequent) trips to the pages yields an unexpected sight or somehthing may be clearer.

Here's one I came across today:

net.get_player_list()

I recommend to amend the description by the (implicit, but not obvious) information that the table returned is a table of playerID.

Here's a demo script

net.log("all players:")
local all = net.get_player_list() -- list of playerID
for idx, pid in pairs (all) do 
	pName = net.get_player_info(playerID, 'name')
	net.log("player <" .. pName .. ">")
end

 

  • Like 1
Link to comment
Share on other sites

Some suggestions for onPlayerChangeSlot(id)

 

The description could mention that the id passed is the playerID (people may assume it's a slotID).

It may also help to remind people here (and in other places) that slotID and unitID are the same, and can be used interchangeably (I'm unsure in this regard when it comes to crew, I did not find any place that describes how it is handled if you try to getUnitProperty with a crew slot, e.g. "23_2" for a Huey).

To underscore this, perhaps the following demo is helpful

function sq.onPlayerChangeSlot(playerID) 
	local slotID = net.get_player_info(playerID, 'slot') -- get slot
	local uName = DCS.getUnitProperty(slotID, DCS.UNIT_NAME) -- slotID and unitID are the same!
	net.log("player <" .. name .. "> slotted to <" .. uName .. ">")
end

 

  • Like 1
Link to comment
Share on other sites

On 8/17/2023 at 7:01 AM, Grimes said:

So this page?

https://wiki.hoggitworld.com/view/Category:Functions

Granted it mixes in gameGUI API functions. 

 

The "Static Function" naming comes from what the original documentation had for functions that are part of a class, but don't require the object in order to actually run and return data. For instance X.getByName is a static function since it returns the object. Similarly getDescByName() is the same as object:getDesc(), but getDescByName takes a string value to return the desc table. Warehouse.getResourceMap is the same way. It probably wouldn't hurt to add the static functions to the list of class functions for each class. 

omg, you see I never knew that existed!! I was finding them through... I can't explain how i was finding/looking/searching!! Would it help to understand how people use first to be able to fix how they are failing maybe? For me I often want to scan the lot because I am trying to see if there is another function I maybe didn't consider. Not sure if that helps 🙂

On 8/17/2023 at 11:18 AM, cfrag said:

Some suggestions for onPlayerChangeSlot(id)

 

The description could mention that the id passed is the playerID (people may assume it's a slotID).

It may also help to remind people here (and in other places) that slotID and unitID are the same, and can be used interchangeably (I'm unsure in this regard when it comes to crew, I did not find any place that describes how it is handled if you try to getUnitProperty with a crew slot, e.g. "23_2" for a Huey).

To underscore this, perhaps the following demo is helpful

function sq.onPlayerChangeSlot(playerID) 
	local slotID = net.get_player_info(playerID, 'slot') -- get slot
	local uName = DCS.getUnitProperty(slotID, DCS.UNIT_NAME) -- slotID and unitID are the same!
	net.log("player <" .. name .. "> slotted to <" .. uName .. ">")
end

 

This one threw me, but iirc its the way it was written in the API docs just pasted in. It's weird that no one but Grimes actually updates this, I'm wondering if this is the barrier. I've updated Wikipedia more times than API docs.

  • Like 1

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

6 hours ago, Pikey said:

It's weird that no one but Grimes actually updates this, I'm wondering if this is the barrier. I've updated Wikipedia more times than API docs.

They never setup the email service to create accounts or to recover passwords on their wiki. Which means that someone with moderator powers, usually me, has to create an account for anyone who wants one. I've only done it a handful of times and the users either forget their login credentials or never actually make any edits. On one hand its spam free which plagued ED's wiki when they had one. On the other its a gate that blocks the advantage of it being a wiki. So I just edit stuff when people give specific examples of pages that need love or see someone asking for help and the relevant page could use some edits. 

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...