Author Topic: A collaborative PUD editor.  (Read 40078 times)

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
A collaborative PUD editor.
« on: December 20, 2016, 01:26:54 AM »
Following the discussion on THIS thread, I thought a collaborative project to make a PUD editor might be a good first step to get all the geeks with ideas working together.

This would be made using ASM, and with as many people as are interested contributing, and the source code being publicly available to all.

I want to use ASM as any real game modding beyond the basic substitution of constant values in the exe requires an understanding of machine code, and a simple project such as this would be an ideal way to create a common platform/language that we can collaborate with.

ASM is actually pretty easy to use. Once you get your head around it there is actually a lot less syntax and fewer rules to learn than higher level languages i.e. C++, java etc.

Ideally people who have some programming experience would be helpful, but it is not necessary to know ASM. I can get it started and show you how to impliment things that you are familiar with from other languages.

Project components:

  - Define/develop an internal container for PUD files.
  - Load/Save PUD files to/from this container.
  - GUI to display the PUD, Select objects/regions etc.
  - Individual editing modules to perform editing tasks
     i.e.
          - Unit properties editor
          - Map properties editor
          - add/remove units
          - ???specialised tasks???

  - Other utility modules to perform non-editing tasks
     i.e.
          - Make a BMP from a pud
          - Dump PUD statistics to a file
          - ???Whatever else anyone can come up with???.

I have a few ideas, and I know there's at least a few others out there who have good ideas/skills. This is an easy way for people to learn to program in assembly, and as the PUD format is well known and documented nobody has to worry about others taking advantage of their research, or using it to develop hacks.

By the time we have done this, we should have the common ground and communication we will need if we are ever going to have a go at collaborating for some genuine WC2 modding/improvement.

Anybody who wants to be involved, please reply to this thread.
Please leave a rough description of where you're up to:
i.e.
        "I am helpful, learn fast, and have lots of enthusiasm"
        "I have some programming experience"
        "I'm quite experienced in programming but not so much in ASM"
        "I'm a freakin guru"

Unless you are best described by one of these two:

        "I could help, but I have more fun trolling"
        "I just like trying to sound important, but dont actually contribute anything"

In which case just go join one of Dellam's chop games and let the adults talk.  ;)
« Last Edit: December 20, 2016, 01:42:21 AM by Lambchops »
its gooder to hax hard and NEVER get caught!

Offline Igognito

  • Axe Thrower
  • ****
  • Posts: 406
    • View Profile
Re: A collaborative PUD editor.
« Reply #1 on: December 20, 2016, 06:08:34 AM »
That is a big project man!

You can count me in...

I'm an experienced programmer and in the far past I even wrote in Assembly so it would not take me that long to get unrusty. I never though modified existing compiled programs so that will be new to me.

A bigger concern is my time availability. I will offer what I can ????

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #2 on: December 20, 2016, 06:39:40 AM »
That is a big project man!

You can count me in...

I'm an experienced programmer and in the far past I even wrote in Assembly so it would not take me that long to get unrusty. I never though modified existing compiled programs so that will be new to me.

A bigger concern is my time availability. I will offer what I can ????

Nice. Time is the big one for most of us. A simple PUD editor shouldn't be too hard, once the basic framework is in place I'm hoping that people will add bits on one at a time until its got all the cool features.

Modifying wc2 is pretty much our only option if we are ever going to make the sort of features people want really happen, but for starters the editor will just be a standalone app.

I'll give it a few days for the people that are interested to see this and sign up, then we can start talking turkey :D
     ( please spread the word around the nerdy types )

Thanks for your support.




its gooder to hax hard and NEVER get caught!

Offline Delete mine too

  • Death Knight
  • *********
  • Posts: 2652
  • http://meatspin.com
    • View Profile
    • http://meatspin.com
Re: A collaborative PUD editor.
« Reply #3 on: December 20, 2016, 08:59:07 AM »
Sure! Not sure what I could do to assist you all, not really familiar with ASM. But if you teach I shall follow.

I know easycompany is not a programmer but I will be showing him basic languages as vb.net, vb6, etc. He is a great reverse engineer! That's just as important as a programmer.

Edit: We already made a unit editor, etc.

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: A collaborative PUD editor.
« Reply #4 on: December 20, 2016, 09:03:45 AM »
i can go back to looking around in the pud...its got promise as bnet's puds are different from dos.

the 2 engines will do different stuff :P why shooting ballistas wasnt found in dos..

my main objective is to find the object size of ships and birds..... but still elusive  :(
« Last Edit: December 20, 2016, 12:48:01 PM by easycompany »

Offline iL

  • Administrator
  • Ogre Mage
  • *****
  • Posts: 1653
    • View Profile
Re: A collaborative PUD editor.
« Reply #5 on: December 20, 2016, 09:27:14 AM »
Great idea!
Not sure i can help, at least i have no time for most projects, but i'd be glad to help with something if i can.

Lambchops, are you ASM-programmer? I'd never make such project on ASM, i just mean C would be easier to use, but i'd look at such ASM program with interest.
Need help to translate War2Combat to German, French, Italian, Polish or another language: http://forum.war2.ru/index.php/topic,4728.0.html
Please, contact me if you are interested in that.

Offline salvadorc17

  • Grunt
  • ***
  • Posts: 120
    • View Profile
Re: A collaborative PUD editor.
« Reply #6 on: December 20, 2016, 02:51:19 PM »
Why you want to use asm programming, unless you want to change game executable??

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #7 on: December 20, 2016, 04:47:15 PM »
Sure! Not sure what I could do to assist you all, not really familiar with ASM. But if you teach I shall follow.


Awesome :)

I know easycompany is not a programmer but I will be showing him basic languages as vb.net, vb6, etc. He is a great reverse engineer! That's just as important as a programmer.


... and nobody puts in more time or is more comitted to messing with WC2.

Edit: We already made a unit editor, etc.


Cool, it will no doubt be easy for you to create a unit editor module for this project.


i can go back to looking around in the pud...its got promise as bnet's puds are different from dos.

the 2 engines will do different stuff :P why shooting ballistas wasnt found in dos..

my main objective is to find the object size of ships and birds..... but still elusive  :(


hehe... you're going to love this.

Yeah birds, ships and flyers can only exist at even numbered co-ordinates... like (2,6) or (20,12) but never (7,12) .... strangely it appears oil patches can only exist at odd numbered co-ordinates, but gold mines are not restricted.

Great idea!
Not sure i can help, at least i have no time for most projects, but i'd be glad to help with something if i can.

Lambchops, are you ASM-programmer? I'd never make such project on ASM, i just mean C would be easier to use, but i'd look at such ASM program with interest.


Great :) I'm hoping once people see how it comes together, they will get enthusiastic about adding things to the project.

Why you want to use asm programming, unless you want to change game executable??


Well.... because, my friends:

   a) ASM rocks ur momma's socks off! Nothing is faster, smaller or sexier than ASM
   b) Like I say, we DO want to mod the .exe

Everybody has ideas about what they want WC2 to be able to do, and they almost all end up being things that require modding the exe. We have lots of people with ideas, some with coding skills, but as far as being able to look at a disassembly and have any idea what it is doing ... before today it seemed to be only me... (Now I know igognito has done some ASM and perhaps others will appear too)


BUT, I don't think this is because I'm smarter than anyone else here, indeed on the whole, the WC2 community is made up of some very clever people (much as it pains me to admit it in some cases lol), its just because nobody else has been exposed to it very much.

The thing is... it's dead easy, it really is, but the establishment (M$ and whoever else) don't want people poking around in the internals of executables. When you start doing that you realise that .dlls are just the same and the whole OS is just made up out of a big pile of them, and they DO NOT want anybody poking around in their operating system. So the whole thing just gets obscured by 10 layers of hokus-pokus and gobbldeegook. For me, the lower you go, the simpler everything is. 99% of all code is made up of maybe 20 common instructions.

So... why use ASM for this project? Mainly so I can get everyone else here thinking in terms of how .exe files are actually put together and how machine code actually executes. So when I start talking about stack frames, calling conventions, memory models, flag registers or whatever, you all have half a clue WTF I'm talking about lol.

Like I say its not hard, and once you get your head around the basic concepts its really simple. There's pleanty of people here with the brains to do it... I'm quite sure iL could code rings around me in C++, I hate bloody C, it's a pain in the ass.

I'm sure when you've finished with this project, most people will go back to using whatever language they're most familiar with, but I absolutely guarantee you that if you can learn some ASM, when you go back to C or whatever else you will have a whole new understanding of what your code is actually doing....
          ..... and there's really no other way anyone is going to understand what WC2 is doing, unless someone can convince Blizzard to hand over the source code (gl with that).

Anyway, thanks to all of you for showing an interest :) Watch this space for a crash course in ASM and .PUD files. I just spent an hour or 2 setting out and commenting the bones of a basic ASM windows app that we can use as a starting point.

In the meantime download MASM32 from one of these:

           AUSTRALIA
           USA
           EASTERN EUROPE
Or apparantly this site:
           WESTERN EUROPE

 has a version with German language support, athough I don't know how good it is, because I dont speak German.

..and have a go at how fast the installer (entirely coded in ASM, of course) unpacks the whole thing from a 4.8MB download and completely builds all the .lib files from scratch. Damn that's sexy  :fro:





« Last Edit: December 20, 2016, 04:54:35 PM by Lambchops »
its gooder to hax hard and NEVER get caught!

Offline xboi209

  • Grunt
  • ***
  • Posts: 80
    • View Profile
Re: A collaborative PUD editor.
« Reply #8 on: December 21, 2016, 02:35:12 AM »
So... why use ASM for this project? Mainly so I can get everyone else here thinking in terms of how .exe files are actually put together and how machine code actually executes. So when I start talking about stack frames, calling conventions, memory models, flag registers or whatever, you all have half a clue WTF I'm talking about lol.
It's a good idea to do this as a learning opportunity, but nothing more. If you want an editor with long term support and quicker development, you should really consider a high level language.

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #9 on: December 22, 2016, 03:06:14 AM »
Quote from: Lambchops on December 20, 2016, 04:47:15 PM    So... why use ASM for this project? .....

It's a good idea to do this as a learning opportunity, but nothing more. If you want an editor with long term support and quicker development, you should really consider a high level language.

In the nicest possible way.... Sheesh, get with the program lol.

I don't especially want another PUD editor.
I have already written an editor in a high level language, so have pleanty of others
This IS a learning opportunity.

The end goal is to get people up to speed and capable of developing WC2 and adding real features.

And BTW I reject your assertions. "Quicker development"... maybe slightly for some jobs, but the trade-off is speed, effiancy and reliability.

"Long term support" must be a joke. ASM was around before any other language and it's not going anywhere, because it literally CAN'T, not unless the world is going to stop developing new processors. ASM code is just as maintainable as any other sort of code, and is less likely to attract the kind of script-kiddies who just want to crudely hack in something with their own name on it.

With the greatest of respect, these are the sort of standard arguments that are often used by people who can't program in assembly to make excuses because their egos feel threatened. My response to them is "nobody is saying you should learn assembly, do whatever you want, but please don't start talking about a subject you clearly know nothing about"

I'm not suggesting that you are one of these people, I don't know you at all, maybe you have just been listening to some of them, but if you are ever looking for support around the ASM community, I would highly reccomend you don't start by espousing those sort of opinions ;)


Anyway, it sounds like you have some amount of programming knowledge, so please feel free to join in with this exercise and contribute. You never know, you might find you like ASM a whole lot better than you thought you did.   :)

« Last Edit: December 25, 2016, 09:26:35 AM by Lambchops »
its gooder to hax hard and NEVER get caught!

Offline xboi209

  • Grunt
  • ***
  • Posts: 80
    • View Profile
Re: A collaborative PUD editor.
« Reply #10 on: December 22, 2016, 07:45:43 AM »
The end goal is to get people up to speed and capable of developing WC2 and adding real features.
Fair enough.

"Quicker development"... maybe slightly for some jobs, but the trade-off is speed, effiancy and reliability.
C++ compilers are usually able to achieve the same, if not, better speeds than hand written assembly. High level languages offer way more reliability than assembly as well.

"Long term support" must be a joke. ASM was around before any other language and it's not going anywhere, because it literally CAN'T, not unless the world is going to stop developing new processors. ASM code is just as maintainable as any other sort of code, and is less likely to attract the kind of script-kiddies who just want to crudely hack in something with their own name on it.
What I meant by that is finding contributors, you'll have a hard time finding people willing to write assembly code over code in a high level language in their free time. If you don't want script kiddies contributing, just put your code in a repository and review all pull requests.
Then again, this is supposed to be a learning opportunity, so no need to argue anymore.

Offline I hate naggers

  • Ogre Mage
  • ********
  • Posts: 2345
    • View Profile
Re: A collaborative PUD editor.
« Reply #11 on: December 22, 2016, 11:51:18 AM »

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #12 on: December 22, 2016, 12:20:37 PM »
http://wiki.teamliquid.net/starcraft/Chaoslauncher


Yeah the Koreans have done some fully INSANE stuff with SC1. I tried to research it all about 10 years ago but everything was in Korean, they may have some better user docs by now, but I doubt they'll have translated and published their source, although I'd love to hear about it if you find anything.
its gooder to hax hard and NEVER get caught!

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #13 on: December 22, 2016, 12:23:21 PM »
C++ compilers are usually able to achieve the same, if not, better speeds than hand written assembly. High level languages offer way more reliability than assembly as well.

hmmm....

I must learn what those magic "C++ only" instructions are that can't be coded in ASM... then I would be a GOD!
« Last Edit: December 23, 2016, 10:43:09 AM by Lambchops »
its gooder to hax hard and NEVER get caught!

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #14 on: December 22, 2016, 12:25:29 PM »
          PART 1 HERE

Ok I have written a short intro to ASM which is in the attached PDF file.

Also here is the source and make file i have written for a bare-bones windows app that we can use as a starting point.

Have a look if you're interested in this stuff  :)

« Last Edit: February 25, 2017, 02:57:26 AM by Lambchops »
its gooder to hax hard and NEVER get caught!