Want to do lua mod with WesnothXP and Warcraft3PRNG options.

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Want to do lua mod with WesnothXP and Warcraft3PRNG options.

Post by StevenAus »

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.
ZedDB
Posts: 18
Joined: December 28th, 2011, 6:19 pm

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by ZedDB »

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.
Last edited by ZedDB on June 15th, 2013, 7:51 am, edited 1 time in total.
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by StevenAus »

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.
Attachments
LoW-The_Saurian_Treasury_Turn_4b.gz
(56.42 KiB) Downloaded 349 times
User avatar
DranKof
Posts: 34
Joined: May 30th, 2013, 6:35 am
Location: Beijing, China

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by DranKof »

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.
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!
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by StevenAus »

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.
ZedDB
Posts: 18
Joined: December 28th, 2011, 6:19 pm

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by ZedDB »

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
Last edited by ZedDB on June 15th, 2013, 6:46 am, edited 2 times in total.
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by StevenAus »

Can WML do it? Or is it just too slow?
User avatar
Dugi
Posts: 4965
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by Dugi »

You can't do it only with WML, because there is no way to get your code loaded everywhere.
ZedDB
Posts: 18
Joined: December 28th, 2011, 6:19 pm

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by ZedDB »

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 :P
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
ZedDB
Posts: 18
Joined: December 28th, 2011, 6:19 pm

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by ZedDB »

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.
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by Crow_T »

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.
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by StevenAus »

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. =)
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by Crow_T »

I'm curious about WesnothXP as well- is there a patch or version to try available anywhere?
User avatar
StevenAus
Posts: 84
Joined: December 18th, 2009, 12:15 am
Location: Perth, Australia
Contact:

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by StevenAus »

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
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Want to do lua mod with WesnothXP and Warcraft3PRNG opti

Post by Crow_T »

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:
Spoiler:
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 :)
Post Reply