
EDuke32 Scripting "CON coding help"
#2341 Posted 30 September 2018 - 07:55 PM
This post has been edited by Mark: 30 September 2018 - 07:56 PM
#2342 Posted 30 September 2018 - 09:37 PM
#2343 Posted 01 October 2018 - 12:38 AM
Mblackwell, on 30 September 2018 - 09:37 PM, said:
Yes, and that's very useful.
Note that I was careful to use the past tense in my post and said we "used to" not be able to append events.
#2344 Posted 01 October 2018 - 06:12 AM
Forge, on 30 September 2018 - 07:42 PM, said:
Gotta be dedicated to learn it.
The major downside to me seems like eduke32 updates are always inadvertently breaking things. Pretty good deterrent for someone with a lack of patience.
I have no intention of writing custom scripts, I just want to be able to understand chunks of other people's code so that I can adapt it for my own TC... but yes even to get an elementary understanding is testing my dedication
#2345 Posted 01 October 2018 - 06:38 AM
Mark, on 30 September 2018 - 07:55 PM, said:
Con coders like to flaunt their knowledge, not write tutorials.

exhibit 1A:
Trooper Dan, on 30 September 2018 - 03:08 PM, said:
Sure. But do you know how to field-dress a deer?
This post has been edited by Forge: 01 October 2018 - 06:40 AM
#2346 Posted 01 October 2018 - 07:35 AM
Trooper Dan, on 30 September 2018 - 03:18 PM, said:
CON does have a huge number of commands which often do complex things. Want some money sprites to spawn and float realistically to the ground? Easy: use the money command. Want to make an earthquake? Easy: use the quake command. And so on. Those sorts of commands are like a vending machine -- you just press the right button and the thing you want comes out, already packaged for you. But in addition to the vending machine, CON also has a kitchen fully stocked with raw ingredients where you can make pretty much anything you want.
I think some people get caught up on the convenience of the vending machine and never learn how to cook. If you are making a mod that has non-trivial coded features, you should learn how to cook.
That's true, but the wikia is not as exhaustive as it could have been. For comparison, when creating Cosmetic Doom I barely asked the community any questions regarding coding, since the zDoom wikia is packed with all the information one could need. Yes, I am constantly looking at mods and their code if they have features that interest me, but that alone can only get one so far.
conoklast, on 01 October 2018 - 06:12 AM, said:
This x 100.
This post has been edited by December Man: 01 October 2018 - 07:39 AM
#2347 Posted 01 October 2018 - 10:15 AM
#2349 Posted 01 October 2018 - 11:20 AM
#2350 Posted 01 October 2018 - 12:32 PM
Trooper Dan, on 01 October 2018 - 10:15 AM, said:
Thank you very much.
Mblackwell, on 01 October 2018 - 10:56 AM, said:
Yes, but the fact that you had to learn it the hard way does not mean that everyone else should. Expanding the wiki could potentially expand the community as well and the mod quantity / quality.
#2351 Posted 01 October 2018 - 12:48 PM
December Man, on 01 October 2018 - 12:32 PM, said:
Yes, but....
People should also take it upon themselves to try things out and be willing to experiment and learn the hard way, instead of being spoon-fed the answers and not really learning anything except how to ask someone to do it for them.
give a person a fish vs. teaching them to fish, blah-blah-blah......
try first, ask second
This post has been edited by Forge: 01 October 2018 - 12:49 PM
#2352 Posted 01 October 2018 - 12:50 PM
Here's the main page of the scripting wiki:
https://wiki.eduke32.../wiki/Scripting
It starts by linking to some old guides which cover the basics of the scripting language from the 1996 version (which is still applicable to the enhanced version). It then talks about important enhancements and how to use them, including game variables, game structures, game events, and formatting. At the top there are links to documentation on the various commands, events and structures within the game.
Everything I listed above could be improved. But, for those of us who are already familiar with the system, it's not obvious what the biggest deficiencies are. If people want to chime in about what most needs improvement, that would be helpful.
#2353 Posted 01 October 2018 - 01:18 PM
#2354 Posted 01 October 2018 - 01:43 PM
December Man, on 01 October 2018 - 12:32 PM, said:
The hard way? The FAQs cover things that were available at the time in a good amount of detail and with clear explanations. I mostly just went "can I?" and then searched to see if a command or set of commands existed that would let me do that in some way. And often I did NOT code things in bespoke ways (based on Duke3D's vanilla CON files for example) when I thought of easier ways of doing the same thing based on the available commands. Saying that scripting is easy would be lying, but only because of the variety of functions now available and the kinds of things you can do. But the basic stuff is very simple. And when you are starting out you should stick to the basics.
#2355 Posted 01 October 2018 - 02:22 PM
Trooper Dan, on 01 October 2018 - 12:50 PM, said:
Here's the main page of the scripting wiki:
https://wiki.eduke32.../wiki/Scripting
It starts by linking to some old guides which cover the basics of the scripting language from the 1996 version (which is still applicable to the enhanced version). It then talks about important enhancements and how to use them, including game variables, game structures, game events, and formatting. At the top there are links to documentation on the various commands, events and structures within the game.
Everything I listed above could be improved. But, for those of us who are already familiar with the system, it's not obvious what the biggest deficiencies are. If people want to chime in about what most needs improvement, that would be helpful.
I think what the wiki really needs are examples of using functions, events etc. within code. In zDoom wikia there are action functions:
https://zdoom.org/wi...ction_functions
Notice that each one has an example of how to use it within the code, even if they seem redundant at times. There are a few exceptions with no examples, but these have this note added:
Quote
Furthermore, many new functions e.g. events have no pages added. Notice how many hyperlinks are red here:
https://wiki.eduke32...wiki/Event_list
I guess I can assume which some of them do, but having clear verified info about it would save a lot of time.
This post has been edited by December Man: 01 October 2018 - 02:23 PM
#2356 Posted 01 October 2018 - 02:31 PM
Hendricks266, on 01 October 2018 - 01:18 PM, said:
That implies that all con documentation and references are shit, and all of the knowledgeable people would rather horde their little gems just so they could tell new people they don't have time to help.
I have a hard time believing that about my favorite Duke community members.
This post has been edited by Forge: 01 October 2018 - 02:32 PM
#2357 Posted 01 October 2018 - 02:39 PM
#2358 Posted 01 October 2018 - 02:49 PM
Hendricks266, on 01 October 2018 - 01:18 PM, said:
This is getting off the topic of documentation, but I think it would be reasonable to end EDuke32 development and shift everything over to a port with a new name. What I mean is, make sure that EDuke32 is in a good place, fix known bugs, and then just leave it. Start a new project called "EDuke Pro" (not really because that name sucks) and use the opportunity to prune all of the deprecated or just bad commands, and make things work better in general with worrying about old mods. The old mods would still work with "EDuke32" as intended, and those of us who care could port our old mods to "Eduke Pro" or whatever it's called without too much trouble.
I know it must be hard to stay motivated to work on EDuke32 if you feel that you can't make it what it should be because of maintaining compatibility with old projects.
#2359 Posted 01 October 2018 - 02:55 PM
I suppose like 95% of noobs I want to go straight to "create a custom weapon". If I'm going to test my sanity learning something very foreign to me I want to at least be motivated to do it.
However, I realise that I'm turning several pages at once, and that I'll just have to persist with the pain learning lots of seemingly pointless and trivial things until I actually make something cool.
#2360 Posted 01 October 2018 - 03:04 PM
This is a good example of what I was up against early in my con code learning. There are many just like this.
The command seems very simple. Fill in a number for a sector and a sector tag. But where do I get those numbers from? It can't be as easy as taking the sector number shown in Mapster because those numbers are dynamic and can change. That leads me to believe there are more con commands that need to be included to get those 2 numbers to enter and to make use of the command. If so, the wiki should explain it right there and provide a small example.
This post has been edited by Mark: 01 October 2018 - 03:06 PM
#2361 Posted 01 October 2018 - 03:05 PM
Trooper Dan, on 01 October 2018 - 02:49 PM, said:
my vote is for eDuke64
#2362 Posted 01 October 2018 - 03:08 PM
#2363 Posted 01 October 2018 - 03:17 PM
Hendricks266, on 01 October 2018 - 02:39 PM, said:
there should be - nuances and all.
It's something a lot of first time script modders aspire to do. That and new enemies. Modified huds and equipment items are probably high on the wish-list as well.
I find it strange that after all these years, nobody has put together an extensive how-to for eduke32 script modding.
If I had two brain cells to rub together I would have got into scripting instead of making crappy maps.
#2364 Posted 01 October 2018 - 03:20 PM
December Man, on 01 October 2018 - 02:22 PM, said:
https://zdoom.org/wi...ction_functions
Notice that each one has an example of how to use it within the code, even if they seem redundant at times. There are a few exceptions with no examples, but these have this note added:
Furthermore, many new functions e.g. events have no pages added. Notice how many hyperlinks are red here:
https://wiki.eduke32...wiki/Event_list
I guess I can assume which some of them do, but having clear verified info about it would save a lot of time.
Mark, on 01 October 2018 - 03:04 PM, said:
This is a good example of what I was up against early in my con code learning. There are many just like this.
The command seems very simple. Fill in a number for a sector and a sector tag. But where do I get those numbers from? It can't be as easy as taking the sector number shown in Mapster because those numbers are dynamic and can change. That leads me to believe there are more con commands that need to be included to get those 2 numbers to enter and to make use of the command. If so, the wiki should explain it right there and provide a small example.
Looks to me you guys just volunteered to update that wiki.
Just ask questions here, and once settled, add to the wiki.

This post has been edited by Hank: 01 October 2018 - 03:21 PM
#2365 Posted 01 October 2018 - 03:20 PM
Hendricks266, on 01 October 2018 - 03:08 PM, said:
I wouldn't call it forking. I would all it rolling out a new model and not worrying about backwards compatibility.
This post has been edited by Forge: 01 October 2018 - 03:21 PM
#2366 Posted 01 October 2018 - 03:25 PM
This post has been edited by Mark: 01 October 2018 - 03:27 PM
#2367 Posted 01 October 2018 - 03:25 PM
Hank, on 01 October 2018 - 03:20 PM, said:
Just ask questions here, and once settled, add to the wiki.

second that motion. take it to a vote.
Mark, on 01 October 2018 - 03:25 PM, said:
wrong info can be updated and fixed. it's a start.
This post has been edited by Forge: 01 October 2018 - 03:26 PM
#2369 Posted 01 October 2018 - 03:31 PM
Mark, on 01 October 2018 - 03:29 PM, said:

too late

there's more than one way to get results in script.
same as making a sloped sector in mapster - depends on which wall is the first wall. Opposite opposing walls of equal angles get the same result & both ways can be explained.
This post has been edited by Forge: 01 October 2018 - 03:34 PM
#2370 Posted 01 October 2018 - 03:36 PM
An example popped into my head. In Mapster I made it so a sound plays when the player enters a certain sector. Later on I wanted some more stuff to happen at the same time. I had recently looked in the wiki about game events. I decided to use an event to watch for when that sound played and then run my little block of code. It worked fine but for reasons I have forgotten, I was told it wasn't the proper way to accomplish my goal. So I'm afraid of putting more of that kind of thing in the wiki.
This post has been edited by Mark: 01 October 2018 - 03:50 PM