Duke4.net Forums: EDuke32 Scripting - Duke4.net Forums

Jump to content

  • 115 Pages +
  • « First
  • 77
  • 78
  • 79
  • 80
  • 81
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Mark 

#2341

There is a wiki but a lot of entries are empty or have an entry thats too technical for a noob. Some newer features IIRC haven't even been listed there yet. Even so, it has a lot of good info and I reference it often.

This post has been edited by Mark: 30 September 2018 - 07:56 PM

1

User is offline   Mblackwell 

  • Evil Overlord

#2342

You actually can append event code.
https://wiki.eduke32...nt_manipulation
0

User is online   Danukem 

  • Duke Plus Developer

#2343

View PostMblackwell, on 30 September 2018 - 09:37 PM, said:

You actually can append event code.
https://wiki.eduke32...nt_manipulation


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

User is offline   MC84 

#2344

View PostForge, on 30 September 2018 - 07:42 PM, said:

i wouldn't even try to figure out con aside from changing sounds & episodes/maps. Some of the effects people pull off are pretty amazing.

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
2

User is offline   Forge 

  • Speaker of the Outhouse

#2345

View PostMark, on 30 September 2018 - 07:55 PM, said:

There is a wiki but a lot of entries are empty or have an entry thats too technical for a noob. Some newer features IIRC haven't even been listed there yet. Even so, it has a lot of good info and I reference it often.

Con coders like to flaunt their knowledge, not write tutorials.

Posted Image

exhibit 1A:

View PostTrooper Dan, on 30 September 2018 - 03:08 PM, said:

There are many examples of this from different mods -- it's not particularly difficult but I don't plan to write a tutorial.


Sure. But do you know how to field-dress a deer?

This post has been edited by Forge: 01 October 2018 - 06:40 AM

1

#2346

View PostTrooper Dan, on 30 September 2018 - 03:18 PM, said:

As an aside, I hope this doesn't offend anyone but I've noticed something about a lot of CON scripting questions. A lot of questions are of the form "Is it possible to do X?" but what they really mean is "Is there a command to do X?"

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.


View Postconoklast, on 01 October 2018 - 06:12 AM, said:

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


This x 100.

This post has been edited by December Man: 01 October 2018 - 07:39 AM

2

User is online   Danukem 

  • Duke Plus Developer

#2347

@December Man: dedicate a couple of tiles to being your effect sprites. Using the eventloadactor command, make sprites of those tile numbers run code at map load time. The code should read hitag and lotag into gamevars, set hitag and lotag back to zero and turn the sprites invisible. Then during gameplay, use EVENT_GAME to make the sprites do things such as detect whether the player has entered their sector and then trigger an effect based on the variables. For example, the hitag variable might be a quote number.
2

User is offline   Mblackwell 

  • Evil Overlord

#2348

I learned using the CON FAQ and the EDuke FAQ (which is inaccurate in some cases, also another EDuke reference which doesn't exist anymore and had inaccurate information, but was a good start anyway).
0

User is offline   Mark 

#2349

It must have been tougher for you way back then because you didn't have the code from lots of other coders to look at. We noobs are spoiled.
0

#2350

View PostTrooper Dan, on 01 October 2018 - 10:15 AM, said:

@December Man: dedicate a couple of tiles to being your effect sprites. Using the eventloadactor command, make sprites of those tile numbers run code at map load time. The code should read hitag and lotag into gamevars, set hitag and lotag back to zero and turn the sprites invisible. Then during gameplay, use EVENT_GAME to make the sprites do things such as detect whether the player has entered their sector and then trigger an effect based on the variables. For example, the hitag variable might be a quote number.


Thank you very much.

View PostMblackwell, on 01 October 2018 - 10:56 AM, said:

I learned using the CON FAQ and the EDuke FAQ (which is inaccurate in some cases, also another EDuke reference which doesn't exist anymore and had inaccurate information, but was a good start anyway).


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

User is offline   Forge 

  • Speaker of the Outhouse

#2351

View PostDecember Man, on 01 October 2018 - 12:32 PM, 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.

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

0

User is online   Danukem 

  • Duke Plus Developer

#2352

I don't think anyone is saying that newcomers are obligated to learn things without good resources.

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

User is offline   Hendricks266 

  • Weaponized Autism

  #2353

I don't consider the current state of CON coding functionality to be sufficient for new users to learn easily. Everything is bespoke and ad hoc to the extreme. About the only good ways to learn how to do things are to look at existing code or to ask publicly and have it spoonfed to you. Even then, you end up with every mod having its own versions of boilerplate like weapon drawing functions that can never be modified by improved source port development without updating the mod, and which require the source port to painfully maintain old, flawed ways of doing things.
2

User is offline   Mblackwell 

  • Evil Overlord

#2354

View PostDecember Man, on 01 October 2018 - 12:32 PM, 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.



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

#2355

View PostTrooper Dan, on 01 October 2018 - 12:50 PM, said:

I don't think anyone is saying that newcomers are obligated to learn things without good resources.

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

Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.


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

1

User is offline   Forge 

  • Speaker of the Outhouse

#2356

View PostHendricks266, on 01 October 2018 - 01:18 PM, said:

About the only good ways to learn how to do things are to look at existing code or to ask publicly and have it spoonfed to you.

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

2

User is offline   Hendricks266 

  • Weaponized Autism

  #2357

Take the question "How can I add a new weapon through CON coding?". There are no existing tutorials on the subject. Even for modifying an existing weapon beyond tinkering with WEAPONx_* and projectile stuff, there is nothing beyond "Download weapons.sample.con and change it." Such a tutorial would require covering many fragile/brittle unintuitive small items that must be implemented, all on top of the fact that EDuke32 does not truly support new weapons in a way that integrates them into existing systems like gotweapon, ammo_amount, tossweapon, status bar / mini-HUD drawing, and the weapon sprite that hovers over the player in co-op. If you have to completely reimplement these systems to add new weapons, not only is that yet another bar to clear for a beginner, but it also leads to the creation of single-use suboptimal code that future source port-side development of the original game's systems will never benefit. For example, if someone wanted to add a new weapon, shouldn't a hypothetical revival of EDuke32 for Android show it in the weapon selection circle?
3

User is online   Danukem 

  • Duke Plus Developer

#2358

View PostHendricks266, on 01 October 2018 - 01:18 PM, said:

Even then, you end up with every mod having its own versions of boilerplate like weapon drawing functions that can never be modified by improved source port development without updating the mod, and which require the source port to painfully maintain old, flawed ways of doing things.


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

User is offline   MC84 

#2359

I don't have an issue with the documentation per se; in fact the scripting wiki seems to explain fairly clearly what each .CON primitive does.

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

User is offline   Mark 

#2360

https://wiki.eduke32...ctivatebysector

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

2

User is offline   Forge 

  • Speaker of the Outhouse

#2361

View PostTrooper Dan, on 01 October 2018 - 02:49 PM, said:

I think it would be reasonable to end EDuke32 development and shift everything over to a port with a new name.

my vote is for eDuke64
1

User is offline   Hendricks266 

  • Weaponized Autism

  #2362

Forking is not the solution. It's one of the situations where the adage "...now you have two problems" applies.
0

User is offline   Forge 

  • Speaker of the Outhouse

#2363

View PostHendricks266, on 01 October 2018 - 02:39 PM, said:

Take the question "How can I add a new weapon through CON coding?". There are no existing tutorials on the subject.

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

User is offline   Hank 

#2364

View PostDecember Man, on 01 October 2018 - 02:22 PM, said:

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:

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.

View PostMark, on 01 October 2018 - 03:04 PM, said:

https://wiki.eduke32...ctivatebysector

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. :rolleyes:

This post has been edited by Hank: 01 October 2018 - 03:21 PM

1

User is offline   Forge 

  • Speaker of the Outhouse

#2365

View PostHendricks266, on 01 October 2018 - 03:08 PM, said:

Forking is not the solution. It's one of the situations where the adage "...now you have two problems" applies.

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

0

User is offline   Mark 

#2366

Hank: Somebody would have to keep me in check. There is a good chance I could become "the blind leading the blind" by posting wrong info. I noticed a number of times that when I was working with Mblackwell on my projects I would code something that worked but may not have been the "proper" way to do it. I don't want to pass on my bad habits.

This post has been edited by Mark: 01 October 2018 - 03:27 PM

0

User is offline   Forge 

  • Speaker of the Outhouse

#2367

View PostHank, on 01 October 2018 - 03:20 PM, said:

Looks to me you guys just volunteered to update that wiki.

Just ask questions here, and once settled, add to the wiki. :rolleyes:

second that motion. take it to a vote.


View PostMark, on 01 October 2018 - 03:25 PM, said:

Hank: Somebody would have to keep me in check. There is a good chance I could become "the blind leading the blind" by posting wrong info.

wrong info can be updated and fixed. it's a start.

This post has been edited by Forge: 01 October 2018 - 03:26 PM

0

User is offline   Mark 

#2368

Yeah, but I'll look stupid. :rolleyes:
1

User is offline   Forge 

  • Speaker of the Outhouse

#2369

View PostMark, on 01 October 2018 - 03:29 PM, said:

Yeah, but I'll look stupid. :rolleyes:

too late :P

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

1

User is offline   Mark 

#2370

But some ways are more time efficient than others.

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

1

Share this topic:


  • 115 Pages +
  • « First
  • 77
  • 78
  • 79
  • 80
  • 81
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options