- Joined
- May 8, 2012
- Messages
- 127
Hey! not sure if this has been discussed before much - I searched but didn't find many results.
So about two weeks ago I tried to use ChatGPT for some lua code, simple things - just to get going with my project as I don't know Lua.
Over the course of two weeks, I discovered it is rather powerful, especially coupled with lua debug utils - the visual feedback ingame with errors is a quick screenshot feed to the AI that always leads to a quick solution.
Feeding it logic = gets good results. Not really "make me a spell" but hammering down and breaking down your spell into parts, stitching it together etc.
I think the process is actually not that far from using triggers - You break down some logic, stitch it together.
I have learned more Lua in two weeks than if I had tried to just learn Lua, in my opinion - because I am more of a visual learner, seeing things happen fast made me hungry to read the code and see whats happening - and with GPT help, plus asking it to actually document the code and explain what is what - I kinda got somewhere.
And since I am doing this within a project and constantly improving the work flow - Chatgpt is getting better and better - for example we are now adding hard comments in the code to prevent future gpts from changing certain things or adding where it is not needed.
Slowly we are building a bible of rules, wc3 natives etc and each spell begins with the same "bible foundation"
I tried to get it to use Antares alice and gizmos - Antares had a look at the code, and indeed - it is full of unnecessary stuff, fallbacks etc - But it works, and that is what matters to me - on the map maker side - I had an idea for a hero and I managed to make it happen almost 100% the way I wanted.
I understand some people hate AI - and some people might see this and think Ï dont own this or this isn't mine or whatever - and to all that I say, this is an almost 30 year old hobby - and if I can get an idea from my head on the table efficiently after not touching the editor since 2012 - this is good.
Reforged might have well been an editor update and instead of triggers you'd have a Peon GPT
Without further delay! I present my Necromancer.
ALMOST COMPLETE! one spell right now is not finished and can be ignored
its just a visual.
also ignore the spell names ingame and button position - didnt really get to that, probably should've since I post it here - Tranquility is the only spell that doesnt do anything.
Also I dont know why I put so many grunts and raiders - goodluck trying to kill all that
!! possible though.
There are 5 spells
Soulkeeper - Instead of mana, you use souls - Souls gather around the necromancer to be used for spells. This scales with the necromancers level and can be adjusted in the script very easily (how many souls etc)
Necrosurge - A channeling spell, summons undead using souls. they attack nearby enemies and if there are none they go to the skeleton - can be scaled in the script to have different units spawn per level, more units per level, more range etc)
Tombsworn Calling - Binds souls to undead you summon to make wights - the souls are bound to the skeletons, when they unbind - the skeletons slowly become less etheral and eventually die. In this sample map there is also an anti-necromancer hero with a Repel ability that basically banishes souls - he can use it to "disenchant" the wights.
The necromancer has to keep channeling - if he stops, after 5 seconds the souls unbind and the units will survive for another D10 seconds. While channeling this no new souls spawn for the necromancer.
can be level scaled, which units spawn - how much it blocks soul spawning (can also make it spawn more souls - instead of blocking it) - you can make this an ultimate spell or make it have 10 levels.
Ossuary Retreat - souls carry the necromancer underground and away from enemies - level scaling how many souls are used, distance (i think, i forgot but very easy to add)
Soulsiphon - currently just a visual, I am changing it alltogether - it will use the souls to deal damage.
Then you have the anti necro guy - the Justicar, he has one ability - Repel the Wicked, it deals double damage to undead, demons and "evill" (using naga for this) and currently it repels souls - it banishes them - he can use it to cancel necromancer summons if he catches the soul in the right time - he can banish wights, etc.
Credits for models:
Greedy Martyrdom, johnwar, Vinz - and I am very sorry I cannot find for the life of me who made the green effect im using for Tombsworn.
Big thanks to mighty Antares too.
Disclaimer: I am not pretending I made this code, I am showing what can be done with AI today. I enjoyed the process, I enjoy the result and I am happy to see my idea "come to life" - if you just wanna be negative about AI keep it out of this thread, make your own - this is here to show people who want to use AI, who cant code - who want to make something come to life but struggle getting it out there - that it is possible
P.S - theres some other stuff in the map so the initial bump is probably alice/rpg minimaps and all that loading, I use them in my bigger map!
So about two weeks ago I tried to use ChatGPT for some lua code, simple things - just to get going with my project as I don't know Lua.
Over the course of two weeks, I discovered it is rather powerful, especially coupled with lua debug utils - the visual feedback ingame with errors is a quick screenshot feed to the AI that always leads to a quick solution.
Feeding it logic = gets good results. Not really "make me a spell" but hammering down and breaking down your spell into parts, stitching it together etc.
I think the process is actually not that far from using triggers - You break down some logic, stitch it together.
I have learned more Lua in two weeks than if I had tried to just learn Lua, in my opinion - because I am more of a visual learner, seeing things happen fast made me hungry to read the code and see whats happening - and with GPT help, plus asking it to actually document the code and explain what is what - I kinda got somewhere.
And since I am doing this within a project and constantly improving the work flow - Chatgpt is getting better and better - for example we are now adding hard comments in the code to prevent future gpts from changing certain things or adding where it is not needed.
Slowly we are building a bible of rules, wc3 natives etc and each spell begins with the same "bible foundation"
I tried to get it to use Antares alice and gizmos - Antares had a look at the code, and indeed - it is full of unnecessary stuff, fallbacks etc - But it works, and that is what matters to me - on the map maker side - I had an idea for a hero and I managed to make it happen almost 100% the way I wanted.
I understand some people hate AI - and some people might see this and think Ï dont own this or this isn't mine or whatever - and to all that I say, this is an almost 30 year old hobby - and if I can get an idea from my head on the table efficiently after not touching the editor since 2012 - this is good.
Reforged might have well been an editor update and instead of triggers you'd have a Peon GPT
Without further delay! I present my Necromancer.
ALMOST COMPLETE! one spell right now is not finished and can be ignored
also ignore the spell names ingame and button position - didnt really get to that, probably should've since I post it here - Tranquility is the only spell that doesnt do anything.
Also I dont know why I put so many grunts and raiders - goodluck trying to kill all that
There are 5 spells
Soulkeeper - Instead of mana, you use souls - Souls gather around the necromancer to be used for spells. This scales with the necromancers level and can be adjusted in the script very easily (how many souls etc)
Necrosurge - A channeling spell, summons undead using souls. they attack nearby enemies and if there are none they go to the skeleton - can be scaled in the script to have different units spawn per level, more units per level, more range etc)
Tombsworn Calling - Binds souls to undead you summon to make wights - the souls are bound to the skeletons, when they unbind - the skeletons slowly become less etheral and eventually die. In this sample map there is also an anti-necromancer hero with a Repel ability that basically banishes souls - he can use it to "disenchant" the wights.
The necromancer has to keep channeling - if he stops, after 5 seconds the souls unbind and the units will survive for another D10 seconds. While channeling this no new souls spawn for the necromancer.
can be level scaled, which units spawn - how much it blocks soul spawning (can also make it spawn more souls - instead of blocking it) - you can make this an ultimate spell or make it have 10 levels.
Ossuary Retreat - souls carry the necromancer underground and away from enemies - level scaling how many souls are used, distance (i think, i forgot but very easy to add)
Soulsiphon - currently just a visual, I am changing it alltogether - it will use the souls to deal damage.
Then you have the anti necro guy - the Justicar, he has one ability - Repel the Wicked, it deals double damage to undead, demons and "evill" (using naga for this) and currently it repels souls - it banishes them - he can use it to cancel necromancer summons if he catches the soul in the right time - he can banish wights, etc.
Credits for models:
Greedy Martyrdom, johnwar, Vinz - and I am very sorry I cannot find for the life of me who made the green effect im using for Tombsworn.
Big thanks to mighty Antares too.
Disclaimer: I am not pretending I made this code, I am showing what can be done with AI today. I enjoyed the process, I enjoy the result and I am happy to see my idea "come to life" - if you just wanna be negative about AI keep it out of this thread, make your own - this is here to show people who want to use AI, who cant code - who want to make something come to life but struggle getting it out there - that it is possible
P.S - theres some other stuff in the map so the initial bump is probably alice/rpg minimaps and all that loading, I use them in my bigger map!
Attachments
Last edited:
