Want to do lua mod with WesnothXP and Warcraft3PRNG options.
Moderator: Forum Moderators
Want to do lua mod with WesnothXP and Warcraft3PRNG options.
I want to do a lua mod that works with all new versions of Wesnoth. Where is a good place to start, and I'd love to have help from Yogibear if he can be contacted, and ZedDB, the maker of the Warcraft3 PRNG. Anyone else's advice is appreciated! I've decided that the War3PRNG just doesn't suit maps at hard difficulty where you are outnumbered, and the RNGs in WesnothXP haven't been updated to the latest version for a while.
So, is this feasible? I don't mind learning lua just so I can do this, but any help will be very gratefully appreciated. =)
Also I'm wondering, does AI gold for campaigns get reduced for the new improved AI of the 1.11 development branch, if the AI has been greatly improved?
Have a great day, and I hope that the rest of 2013 is great for you too!
Best regards,
Steven.
So, is this feasible? I don't mind learning lua just so I can do this, but any help will be very gratefully appreciated. =)
Also I'm wondering, does AI gold for campaigns get reduced for the new improved AI of the 1.11 development branch, if the AI has been greatly improved?
Have a great day, and I hope that the rest of 2013 is great for you too!
Best regards,
Steven.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
I've ported the PRNG mod to lua. It's not as clean as the c++ code but not you don't have to use new binaries for it to work.
Edit: just noticed it breaks modifiers for weapons :/
Edit2: fixed it see below.
Edit: just noticed it breaks modifiers for weapons :/
Edit2: fixed it see below.
Last edited by ZedDB on June 15th, 2013, 7:51 am, edited 1 time in total.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Thanks very much for this! A few issues I've found:
I think it's removing traits from units - I don't think they're being replaced by increased stats.
Also, the Elvish Shaman's entangle attack and the Elvish Shyde's slow attack is losing the slow capability when attacking. I think it's an issue with all of the Elvish Slow attacks (and maybe even an issue with Slow attacks in general). I'm not sure about other special abilities.
Edit: I take it you are referring to these issues in your edit from the previous post. Is it fixable?
Here is a save showing these issues. Standard Wesnoth 1.10.6, PRNG mod on.
I think it's removing traits from units - I don't think they're being replaced by increased stats.
Also, the Elvish Shaman's entangle attack and the Elvish Shyde's slow attack is losing the slow capability when attacking. I think it's an issue with all of the Elvish Slow attacks (and maybe even an issue with Slow attacks in general). I'm not sure about other special abilities.
Edit: I take it you are referring to these issues in your edit from the previous post. Is it fixable?
Here is a save showing these issues. Standard Wesnoth 1.10.6, PRNG mod on.
- Attachments
-
LoW-The_Saurian_Treasury_Turn_4b.gz
- (56.42 KiB) Downloaded 349 times
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Heh, that's some REALLY fast work considering. I have to go to work right now, but just downloaded it, and I'll be trying it out tonight or tomorrow night!ZedDB wrote:Yesterday: I don't know LUA so if you guys want to do it you'll have my blessing.
Today: I've ported the PRNG mod to lua. It's not as clean as the c++ code but not you don't have to use new binaries for it to work.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
There are some issues with the first version: some traits disappear and certain (or all?) abilities (like slow) currently disappear and don't work when attacking.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Yeah, that's what I meant the the edit... It seems like I can't copy the original attacks and put them back...
Lua doesn't seem to be able to create a perfect data copy just like that... ARGH
BTW it fail because the data copy doesn't contain the traits/specials of the units. I don't remove them by hand I only change the change to hit
Lua doesn't seem to be able to create a perfect data copy just like that... ARGH
BTW it fail because the data copy doesn't contain the traits/specials of the units. I don't remove them by hand I only change the change to hit
Last edited by ZedDB on June 15th, 2013, 6:46 am, edited 2 times in total.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Can WML do it? Or is it just too slow?
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
You can't do it only with WML, because there is no way to get your code loaded everywhere.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Well seems like I was wrong. It does clone the attacks correctly. I just removed the wrong items (attacks in this case) when cleaning up to restore the original attacks 
Here is the fixed version. I think it should work correctly now. Let me know if it plays the same as the original mod.

Here is the fixed version. I think it should work correctly now. Let me know if it plays the same as the original mod.
- Attachments
-
PRNG_Mod.zip
- (9.15 KiB) Downloaded 359 times
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Ah, thanks dugi for creating the original no random mod that I based this on! 
I was a lot easier to code when I had something similar to look at.

I was a lot easier to code when I had something similar to look at.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Thanks ZedDB for porting this, and thanks Dugi for the initial code- this seems like a good compromise between stock rng and hitting weakly all the time.
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
I would like to thank all involved. Little did I know when I decided to have a go at making a lua patch that pretty much all the work would be done by others! If anyone else wants to port WesnothXP (two different RNG algorithms including the Sauron mod) they are welcome to do so, but I am very pleased with the lua mod that Dugi and ZedDB combined to create and use it all the time now. And the best thing is that it should work with all new versions of Wesnoth - no more new patch needing to be made for each new version. =)
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
I'm curious about WesnothXP as well- is there a patch or version to try available anywhere?
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
Yes, but Yogibear has had a lot of RL stuff to deal with, so it hasn't been able to be updated from the 1.8 Wesnoth versions.
http://forums.wesnoth.org/viewtopic.php?f=36&t=30410
http://forums.wesnoth.org/viewtopic.php?f=36&t=30410
Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti
I've hacked the PRNG mod to make it a bit more aggressive yet still there are misses happening, this is the block I changed:
I'm no Lua coder, so I'm not sure this even did anything, but in gameplay the chance of missing every attack is highly rare, so this suits me just fine atm 
Spoiler:
