The Ethicality of GenAI ZScript?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

The Ethicality of GenAI ZScript?

Post by goldmanvision »

This is my first ZDoom project. I've played many over the years, but have never been active in the modding / TC community.

I've been working on standalone game in GZ/UZDoom and have been using GenAI (GPT-5.6) to help me build some of the more complex functionality that I can do quite easy in Unreal Engine, but recently moved over to GZDoom for a few reasons (one primary reason ironically being Unreal Engine's future reliance on GenAI / ending Blueprint support in future versions). I only started writing zscript about 3 weeks ago. Years of Unreal Engine work and experience down the toilet. Thanks EPIC!

Through the process of using GenAI, it helped to debug, find solutions, parse through the ZDoom Wiki and official docs to find and understand methods and patterns I needed. Sometimes I just needed a sounding board to repeat things back to me like a journal, and remind me when I was beginning to work on things out of scope for project milestones.

I understand that the reason UZDoom exists is partly because GenAI code was pushed to the GZDoom repo without consulting the other devs and maintainers, but in this case, this is code I'm very much testing rigorously, and manually audit all the zscript generated. I often have to manually correct it, or run through multiple iterations of script snippets before I get something to work, and absolutely NO creative elements, such as art assets, dialogue, narrative, class defaults, etc.

I want to ask the community before I go forward because two parts of the foundational architecture are complete now, leaving one final major component left to build - an implementation of libcolony for a rudementary background colony simulation.

I'm a solo developer, and one dealing with a lot of life drama, so I'm using every tool at my disposal to make this dream I've had for a few years now come true. ASEPRITE, Blender, Primbambase, Shoebox, SLADE, and now, GenAI so I can spend less time with extremely tedious logic and math and more time making the stuff that actually gives the game the "fun-factor" and "sauce"; level design, sprite assets, NPC logic - things that GenAI absolutely cannot do.


What are your thoughts? Once again, I do not believe in using GenAI for creative work. I do not consider the scripts GPT-5.6 generated to be creative in anyway. It was NOT "vibe-coded." I had to be extremely specific with patterns, syntax, and pseudocode where I didn't know which functions and methods to call. It's all complex math that I really have no hope of mastering anytime this century. I applaud those who can do everything, from sound design to art assets to programming - I'm not someone with a coding background, but I went to school for audio and new media (digital art). I'm by far the worst programmer in this forum ;)



Thanks!
Last edited by goldmanvision on Tue Aug 11, 2026 10:09 am, edited 1 time in total.
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript

Post by goldmanvision »

And yes, part of the fun of moving from Unreal Engine to GZDoom is the challenge of doing really wild things in an engine that wasn't meant to do any of it, in a clean, functional, non-hacky way. That required me writing scripts and having GenAI audit them to make sure they supported best practices and ZDoom standards.
User avatar
Caligari87
Admin
Posts: 6256
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript

Post by Caligari87 »

goldmanvision wrote: Mon Aug 10, 2026 11:51 amI'm by far the worst programmer in this forum ;)
Using GenAI/LLM code is a great way to never get any better.

8-)
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript

Post by goldmanvision »

Caligari87 wrote: Tue Aug 11, 2026 7:56 am
goldmanvision wrote: Mon Aug 10, 2026 11:51 amI'm by far the worst programmer in this forum ;)
Using GenAI/LLM code is a great way to never get any better.

8-)
How did I know that you, specifically, would eventually come along and say that? :lol: I'm a fan of yours, and dig a lot of what you discuss here.


I definitely see where you're coming from, and please please please don't take this the wrong way but you assume too much about me and my project. You didn't answer my question about the ethicality of using an LLM to help understand concepts and write zscript that is either tedious and repetative (like in the case of state animations with many many sprites - NIGHTMARE), or to do things that I can do in other engines very easily but would take me a very long time to understand how to implement in GZDoom (like decoupling the camera from the weapon). I'm genuinely trying to gauge how the ZDoom community feels about using LLM code.

1) not trying to get better at Zscripting, I'm trying to make a game I've been working on for a few years now. It was in C++ and UE Blueprints. I'm done with Epic, and ZDoom fits the aesthetic of the game. It takes place in 1993-1995, so building it in ZDoom has some meta aspects to the narrative.

2) I chose ZDoom because it's stable and isn't going to break something in my game every time it updates. Also, I've been playing DOOM for over 30 years now, and so have a millions of people. It's familiar in a way Unreal Engine games are not.

3) I've actually learned quite a bit that I couldn't really make heads or tails of via the wiki until implementing some things. Now I can. It's not like the documentation is really the most accessible to people who have never done this before; there's defintely a barrier to entry.

4) I'm really hoping for a bit more feedback than "you'll never get better," which is objectively false. I wouldn't have gotten as far as I have if I wasn't getting better at writing and reading other people's pk3s and zscripts.


So please, I really don't want to argue, and I'm not looking for cheeky answers. Does anyone here explicitly object to "ethical use" of LLMs for zscript, decorate, etc., in this space, for any reason, other than "git gud, n00b?" What does ethical use for scripting even look like? Would people use mods and add-on pk3s that were written, in part or wholly, by an LLM?
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript

Post by goldmanvision »

I did a bit more research, and yeah, I can't post any of the code written by or assisted by an LLM, in raw form or in pk3, on the ZDoom forums. That kinda curbs any discussion about this here :lol:
User avatar
Caligari87
Admin
Posts: 6256
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript

Post by Caligari87 »

Less cheeky: The ethical issues with LLMs in general are less about your intent in using it, and more about the externalities. I fully believe there's a lot of creative and earnest people who wish to use "AI" the "right" way, to create meaningful things beyond their skill ceiling, without dishonesty. That doesn't change the fact that LLMs in their most useful form are currently controlled by evil corporations that have no qualms about killing the planet, stealing intellectual property, and exploiting humanity to the last dollar. LLMs for coding projects (as opposed to simple chatbot-style conversations) are particularly wasteful because they need so much processing power for the amount of context required to do anything useful.

Full disclosure, I'm not perfect and I have sometimes used LLMs for small tasks when it makes sense (troubleshooting Linux quirks mainly. LLMs are extremely good at context analysis tasks). So I understand where you're coming from and I trust your intentions are pure. Mine certainly are. But until I can have a model that is trained on ethically-sourced (not-stolen) data, and I can run it on my own personal hardware instead of at a Google datacenter, I would not use it for a creative project like this. I learned ZScript from wikis and code-diving and experimentation, and it took years. I'm proud of that knowledge and I don't think it's necessary for you to shortcut that journey just to get to the end result faster.

I personally would not play a mod that used generative AI. Many people will have harsher opinions. Many people won't care. You'll get all opinions.

8-)
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript?

Post by goldmanvision »

Ughh, I love this community already lol - thank you for taking the time to share your thoughts! They mean a lot.

I agree 100%, local LLMs can't really cut it at the moment, and regarding stolen data, I really don't think GPT-5.6 "knows" anything about zscripting. I had to learn a LOT of stuff and "train" it myself on official documentation and my own documentation (GDD and architectural rules). Either way, I'm looking at other people's zscripts and figuring out through trial and error how to implement things that fit my architecture. As far as the environmental implications of using it, I really don't think the amount of zscript I throw at it or that it throws back at me is anything near what major corporations, banks, law enforcement, and other shadier sides of humanity are using it for.

I can assure you, Disney and Coca-Cola are using a helluva lot more energy than my rinky dink systems. Yes, turning off a 30watt lightbulb in the bathroom makes a difference for my electric bill, but I don't feel too bad leaving it on when I live 4 miles from Times Square. To quote Eddie Murphy - "turn ya f***in' lights off!"



ALSO, consider if everyone here started asking LLMs to write zscript, then started implementing zscript in their images, metadata, etc., it'd be a nifty way to poison the big LLMs. DOOM runs on everything, and all food recipes now have decorate tags :lol:
User avatar
Enjay
 
 
Posts: 27679
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: The Ethicality of GenAI ZScript?

Post by Enjay »

goldmanvision wrote: Tue Aug 11, 2026 10:40 am I really don't think GPT-5.6 "knows" anything about zscripting.
I'm surprised that you found that. My impression was much more along the lines that it had obviously scraped the Wiki and other sources and was pretty au fait with a lot of the basic structure of ZScript. It seems to "know" how to set it up to do various things. If you start wanting to do complicated stuff, it falls over pretty quickly, or makes assumptions that ZScript will behave in similar ways to other languages (that ZScript may, or may not behave like), and it tends to do things in inefficient ways that an actual person who is properly familiar with ZScript would not.

So, it does seem to "know" something about ZScript, even though it is prone to make false assumptions and some basic mistakes. If you are using it to try and learn ZScript, it could well mislead you or just show you poor examples.
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript?

Post by goldmanvision »

Enjay wrote: Tue Aug 11, 2026 2:21 pm
goldmanvision wrote: Tue Aug 11, 2026 10:40 am I really don't think GPT-5.6 "knows" anything about zscripting.
So, it does seem to "know" something about ZScript, even though it is prone to make false assumptions and some basic mistakes. If you are using it to try and learn ZScript, it could well mislead you or just show you poor examples.
That's what I mean. It's dumb as rocks, and really needs complete documentation, very very strict guidelines, examples of my own zscripting style and formatting, my project GDD, and lots and lots of checking it against other people's code that they made publicly available. Only then was it able to do things that I'm not able to do (like the camera and weapon decoupling with a "free crosshair" mouse aim), and even so, I keep going back every day and reading over the entire codebase, trimming out fat, redundancies, yada yada. Without really serious guardrails directly from the ZDoom community, it's virtually impossible. I had to be extremely deliberate with what information I gave it and what it would consider as sources-of-truth. It can just as easily scrape good code examples from stack exchange and adapt them as it can scrape really bad examples of people trying to figure out scripts. It doesn't have any context for what is clean and dirty code - that's really where my limited knowledge of zscripting (so far) is essential. Someone who has never written any zscript files really shouldn't try any of this :lol:

If I had a team, the time, or even the bandwidth to do all of this solo, I absolutely would. I envy y'all that jumped onto ZDoom modding way before it was even a thought in my mind.


Without writing example zscript for classes and rootlumps myself, the way I format them, the naming conventions for the sprites, the default states and timings, etc., it just spits out junk pseudocode and it even admits to making assumptions about APIs and function names. You gotta "Issac Asimov" the MFer, and in order to do that, you definitely need to understand zscript at a basic level. Knowing C++, C#, etc is not enough to be able to figure out zscript with an LLM alone.

I'm not trying to oversell it as some super powerful thing that enabled me to zscript - I started zscripting some stuff to see if I could do it on my own, and it went off without a hitch. Then I had the novel idea of doing a messy proof of concept prototype with GPT-5.6, just to see if it was capable, and it absolutely wasn't :lol: (at least not at first)
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript?

Post by goldmanvision »

Enjay wrote: Tue Aug 11, 2026 2:21 pm
goldmanvision wrote: Tue Aug 11, 2026 10:40 am I really don't think GPT-5.6 "knows" anything about zscripting.
or makes assumptions that ZScript will behave in similar ways to other languages (that ZScript may, or may not behave like)

Bingo. That was the biggest hurdle. Audit, audit, audit, audit, and audit some more. Then rewrite the whole damn thing and audit again. Just like handwritten code :P
User avatar
m8f
 
 
Posts: 1522
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Location: Siberia (UTC+7)

Re: The Ethicality of GenAI ZScript?

Post by m8f »

I'd argue that individuals using LLM-based tools for free-time hobby projects are not a significant part of the problem. Organizations which utilize such tools at industrial scale, reducing their product and services quality and eliminating jobs for a quick buck, are. It's like environmental pollution - you can (and should) sort waste and recycle, but a factory nearby meanwhile dumps tons of waste unregulated. Forbidding LLM tools for personal use is borderline gatekeeping. Maybe we point the anger at bigger fish.

That said, I recommend giving a second chance to doing it yourself. You may even like it more in the end. Or, if that doesn't work out, maybe teaming up with people who has the opposite set of skills.
User avatar
goldmanvision
Posts: 9
Joined: Mon Aug 10, 2026 11:22 am
Preferred Pronouns: He/Him

Re: The Ethicality of GenAI ZScript?

Post by goldmanvision »

m8f wrote: Wed Aug 12, 2026 7:15 am I'd argue that individuals using LLM-based tools for free-time hobby projects are not a significant part of the problem. Organizations which utilize such tools at industrial scale, reducing their product and services quality and eliminating jobs for a quick buck, are.
Agreed. I mentioned this before, and no one is gonna convince me otherwise on that point lol
m8f wrote: Wed Aug 12, 2026 7:15 am That said, I recommend giving a second chance to doing it yourself. You may even like it more in the end. Or, if that doesn't work out, maybe teaming up with people who has the opposite set of skills.
I'm not only using an LLM to write zscript. I can, have, and am currently writing zscript by hand just fine, but I do struggle with complex math functions. I can make new actor classes, event handlers, and root lump files just fine. It's the stuff like handling mouse input and translating that to a percentage of screenspace / hud drawing, trackball style momentum, etc. It's math that exists in plenty of game code pattern books but is really not my speciality. There's also stuff it boilerplates really well, like actor state machines with proper sprites, timing, etc., which is an immense assist.

I'd rather not work with a team on this for... reasons, unless I'm paying them appropriately, which I can't really do right now. I've spent most of my life doing collaborative creative works with teams, and this is something I really want to take my time with. Not to say I never will, but not for this one. There are as many special qualities in solo projects as team projects.


I also wouldn't be able to get the LLM generated zscripting to work unless I went in and rewrote portions myself / told the LLM to rewrite lines YY to ZZ because I knew of a pattern that was way more efficient and easier to read.


If I were just making a DOOM mod with a couple new sprites and new gameplay, I would probably take the time to write everything by hand, but I'm simultaneously doing photo/pixel art and animation assets, audio recording and editing, narrative writing - pretty much everything that's in my professional skill set EXCEPT for coding, which is the hobby part. I'm looking at LLM zscripting as being akin to cookbooks - you need to know what a shallot is if you're gonna use it in a recipe, and you need to know what blanching is if that's what the recipe calls for. When the cookbook says "blanche the soap and pour the boiling water on your head," I know it's a bad idea BEFORE I do it. Same goes for bad LLM zscripts. Now I can look at it and be like "nah, dude, you're crazy, let me take over" :lol:

Return to “Scripting”