ZScript Discussion
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
-
- Posts: 1384
- Joined: Sun Oct 14, 2012 1:43 am
- Location: Ukraine
Re: ZScript Discussion
It's ok, I'm just meaning here that the final version might be completely different from currently described depending on the final result of the review.
-
- Lead GZDoom+Raze Developer
- Posts: 49182
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZScript Discussion
I have pulled it but right now it's just waiting in a side branch on my HD. Feel free to continue on it, it looks promising but I'd rather wait with a merge until it's finished.
-
-
- Posts: 1384
- Joined: Sun Oct 14, 2012 1:43 am
- Location: Ukraine
Re: ZScript Discussion
Ok, added player events along with some clearly broken ACS-related edits.
Will start adding UI tomorrow, @whoever is interested
Will start adding UI tomorrow, @whoever is interested
Last edited by ZZYZX on Thu Feb 02, 2017 1:44 pm, edited 4 times in total.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
Awesome! Can't wait!
-
- Posts: 13791
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: ZScript Discussion
Color me interested. An internal UI interface without hacky ACS would definitely be nice.ZZYZX wrote:Will start adding UI tomorrow, @whoever is interested
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
And without SBARINFO too! That's HUGE. No more goddamn inventory hacks or being stuck with that greater-than-or-equal-to always-on bullshit.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: ZScript Discussion
YOOOOOOO \m/ \m/ \m/ZZYZX wrote:Ok, added player events along with some clearly broken ACS-related edits.
Will start adding UI tomorrow, @whoever is interested :)
I hope it's not too early for feature requests. Will we be able to get keyboard and mouse events? I'm particularly interested in using the mousewheel, and also letting the player TYPE things. Think of an in-game journal they can type in, like Amulets & Armor, or simply an NPC that asks you to type something for a topic (like in Fallout).
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: ZScript Discussion
Keyboard/mouse events: Don't think that's possible. What you have with GetPlayerInput is all you have.
-
-
- Posts: 1384
- Joined: Sun Oct 14, 2012 1:43 am
- Location: Ukraine
Re: ZScript Discussion
Actually, ZScript event system allows direct hooking into D_PostEvent. Not sure if Graf's ok with that though, since ACS allowed it too but was left with GPI.Major Cooke wrote:Keyboard/mouse events: Don't think that's possible. What you have with GetPlayerInput is all you have.
(on the other side though, there's already RenderFrame event which is of similar direction in that it's specific for each client).
Regarding the event system: Graf, Win32 driver sets data3 to GKM_SHIFT/ALT/CTRL, but SDL doesn't. Not sure about Cocoa.
Is that part ok to try to change? (I personally could probably test this on Win32 and SDL, don't have anything to test Cocoa input on though).
Overall, right now it looks like a complete unstandardized mess and I wouldn't let modders access that really. So yea, awaiting on your response.
Last edited by ZZYZX on Fri Feb 03, 2017 3:01 am, edited 9 times in total.
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: ZScript Discussion
IMO, if you're going to let modders add user interfaces, you should also let them carefully manage input programming. Let's say they want to create a buy/sell window, and want the mousewheel to increase/decrease the amount of items sold, or simply allowing the player to type in how many of the items to sell.
-
- Posts: 1268
- Joined: Wed Jul 20, 2011 4:24 pm
Re: ZScript Discussion
hmm with all those event stuff, could I "eat a keyboard" event? so lets say, I'm on a titlepic and I want to show two maps the first one can be skiped by pressing any kind of Keys, but that shouldn't show the gzdoom menu.
So the only guy that could know about the event is the eventhandler, it send something to the acs and then it change the map.
EDIT: If yes, I'm gonna wait for it so I can make a complete TC from the spooky house titlepic
So the only guy that could know about the event is the eventhandler, it send something to the acs and then it change the map.
EDIT: If yes, I'm gonna wait for it so I can make a complete TC from the spooky house titlepic
Last edited by ibm5155 on Fri Feb 03, 2017 5:33 am, edited 1 time in total.
-
-
- Posts: 1384
- Joined: Sun Oct 14, 2012 1:43 am
- Location: Ukraine
Re: ZScript Discussion
You can eat an event by returning true in the event handler.
Handlers' order (set by Order field) determines what handlers get to processing first. If one of them eats the event, it won't get lower.
Now the problem is that the handlers are processed after console and menu, so I don't think you currently can prevent the menu from appearing altogether.
Handlers' order (set by Order field) determines what handlers get to processing first. If one of them eats the event, it won't get lower.
Now the problem is that the handlers are processed after console and menu, so I don't think you currently can prevent the menu from appearing altogether.
-
- Posts: 1268
- Joined: Wed Jul 20, 2011 4:24 pm
Re: ZScript Discussion
k final question, will the menu be triggered by the keyboard event before the zscript code that "eat" the events?.
EDIT: AHHH , well, ty for the info.
EDIT: AHHH , well, ty for the info.
Last edited by ibm5155 on Fri Feb 03, 2017 5:36 am, edited 1 time in total.
-
-
- Posts: 1384
- Joined: Sun Oct 14, 2012 1:43 am
- Location: Ukraine
Re: ZScript Discussion
Yes. At least right now, if Graf doesn't move menus to ZScript (and I don't think he was ever planning to).
-
- Posts: 13791
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: ZScript Discussion
He was planning to, actually, but I think it's currently a long-term plan.