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

Offline salvadorc17

  • Grunt
  • ***
  • Posts: 120
    • View Profile
Re: A collaborative PUD editor.
« Reply #15 on: December 22, 2016, 02:50:15 PM »
Maybe the post title could get people confused, this seems not only oriented to edit maps but also game in general, so you will need to clarify about that..

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #16 on: December 22, 2016, 10:05:10 PM »
Maybe the post title could get people confused, this seems not only oriented to edit maps but also game in general, so you will need to clarify about that..


This project is to create an editor for Warcraft II .PUD files in ASM.

That is what this project will be making.


The actual goal of the project is to teach people about PE files, and how programs look when they are decompiled and why, to increase the human resources we have to add new features to the wc2 exe. That is why I want to do it with ASM and using the particular methods that I am planning to use. A PUD editor seemed to be a good vehicle for this, because it is on-theme for our shared interest (WC2), and the PUD format is very simple, so an editor for PUD files is not a particularly hard thing to make.

This is WHY I want to do this project, in this way, but this project is just making a PUD editor.


its gooder to hax hard and NEVER get caught!

Offline salvadorc17

  • Grunt
  • ***
  • Posts: 120
    • View Profile
Re: A collaborative PUD editor.
« Reply #17 on: December 23, 2016, 04:15:18 PM »
Ok, now i understand, thanks for clarification, seems good way to have people some asm lessons, i dont want also do another pud, but is good starting to learn how to code for the epic process of change executable.

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: A collaborative PUD editor.
« Reply #18 on: December 23, 2016, 06:50:27 PM »
yall are beyond me..im thinking more on terms of html/java script. lol

but o well i hope everyone has a nerdgasm!

had a couple myself but in the drought right now :(
« Last Edit: December 23, 2016, 06:53:35 PM by easycompany »

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #19 on: December 24, 2016, 12:49:19 PM »
yall are beyond me..im thinking more on terms of html/java script. lol

... each to their own, but I swear ASM is 100x easier than javascript

but o well i hope everyone has a nerdgasm!

had a couple myself but in the drought right now :(

awww...
Nuture your inner nerd... they need love too! :)



In the meantime, i have got together a bit more of the editor... I've made an internal storage container and have routines to load/save PUD files, and to access/update the raw data for each section.

I'm almost finished with a neat little framework for modules that should make it very easy for anyone to add a module to the editor.

There's a template file that people can copy then customise to make their own module window pop up and do something with a part of the PUD.

That way people can start out small and just make a simple module that just changes one thing, then expand on it once they get more familiar with whats going on.


will post an update soon....


« Last Edit: December 24, 2016, 02:55:53 PM 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 #20 on: December 25, 2016, 09:24:59 AM »
          PART 2 HERE

Have updated the project. You can get it HERE

It now has routines for loading/saving PUD files, an internal pud object container, a module framework, a template for creating new modules and a simple module to edit the map description.

Have also add a couple of bits to the ASM intro pdf.

Merry Christmas beautiful people :)

( :-* for any ladies standing under the mistletoe )
its gooder to hax hard and NEVER get caught!

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: A collaborative PUD editor.
« Reply #21 on: December 25, 2016, 10:04:27 AM »
merry christmas lamb!

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #22 on: December 25, 2016, 06:36:13 PM »
merry christmas lamb!
Cheers mate  :) right back at you
its gooder to hax hard and NEVER get caught!

Offline salvadorc17

  • Grunt
  • ***
  • Posts: 120
    • View Profile
Re: A collaborative PUD editor.
« Reply #23 on: December 29, 2016, 02:32:48 PM »
Good work with this example version, now im wondering what else you can achieve with asm into the game executable..

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #24 on: December 30, 2016, 05:10:10 AM »
Good work with this example version, now im wondering what else you can achieve with asm into the game executable..


Lots of things.

FYI. The AH version started as something I did in ASM. I had a working prototype AH client and server that tested ok. It did things like send a copy of the player's mini-map back to the server so you could see instantly if they were mapping.

 This was around the time my daughter was born (my son was 16 months) and I was saving to buy our house - working long shifts etc., so I couldn't put the time in.

I had to have a few years off WC2 at that stage. Before I left I sent blid the source code and notes, instructions, tools etc. to continue with. I'm not sure if they ended up using that as a base for the AH we have now or not, but that's how it started.

... and to start with I made my little build-hack detector, just so people knew I wasn't talking shit about being a programmer. It's not very sophistocated but if someone tries to do a dellam you get an instant alarm.

Oh No!
I was just about to insert a link to the original thread on the old forum which had a description of the build hack detector and eek!:

The old forum at http://war2.warcraft.org/forum/ has gone :( or at least its down right now. All I can get is the homepage of warcraft.org but all the links on it are broken. Anybody know if there's a backup/archive of this anywhere? Would be a shame to lose all that history (lame-ass flame wars and all)

Might do a seperate post about that....

.... anyway the build hack detector... I'll re-write a short description here. I named it "anticrap" for lols. It was just a fairly simple proof-of-concept thing. It checks all newly made buildings to see if the player has the pre-requisites - or at least used to have them.

Because of the glitch/feature where you can, for instance, target placement of a dragon roost but not click to place it, then have your fort destroyed then click and place the roost with no fort, it just checks if the player has had ever had a fort, not if they currently have a fort.

There are ways to do it properly, but as this was just a simple demo (i think i wrote it over 2 evenings after work) it just does a quick reality check. If it detects something "suspicious" it sounds a chime and displays a message like "Player Dellam has built a suspicious Dragon Roost" or whatever. You have to tab out to see the message, but you can hear the alarm in game.

It also has a check-box so you can make black display as hot pink on the mini-map, without changing the color of the units themselves.

.... and being ASM its only 7.5KB - and most of that is the icon and the list of name strings for all the buildings.

There has been a bit of discussion about a new client front-end lately, which is something I would dearly love to do, however there is the small matter of my ex having me evicted out of my own home in about 9 days time that I really should attend to. Sadly that might cramp my style for a while. Cest la vie.


« Last Edit: January 05, 2017, 05:13:25 AM by Lambchops »
its gooder to hax hard and NEVER get caught!

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: A collaborative PUD editor.
« Reply #25 on: December 30, 2016, 07:08:45 AM »
asm has compatability issues? cant run on my win7  ??? dam u and tupac and ex's
« Last Edit: December 30, 2016, 07:44:16 AM by easycompany »

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #26 on: December 30, 2016, 11:32:51 AM »
asm has compatability issues? cant run on my win7  ??? dam u and tupac and ex's
What are we talking about here? The PUD editor, or the anticrap thingy?

Ok, first ASM itself doesn't have compatability issues with operating systems, it can't. It can only have compatability issues with processors, and I usually build random stuff like this for the 80486 instruction set which means it will run on anything made after about 1989.

That being said... if individual program that you write in ASM interacts with the OS (and almost everything does), then like in any language, it can have OS dependant compatability issues.

If we're talking about anticrap (and I think we must be) then I wrote it in December '09, and I no longer have the source. So IDK, I could have even used 586 or 686 instructions, but that still wouldn't be an issue unless ur using a VM that is simulating an old 486 processor or something. Anyway no big deal I could probably re-write it easily enough.

At the time I think I got 3 people to test it - feature, sg and someone else who's name I wasn't really familiar with (it was all on the old forum), and it worked fine for them.

Having a quick look at it now, I can see I used my own custom method of compacting the code, data and import sections together, then using non standard importing/thunk tables that sidestep the system loader importing.

Why? because it worked, it made the file smaller and more secure, and I thought I was being terribly clever lol. However that particular bit of devilry is probably going to be the only thing that could cause issues on more recent puters, PARTICULARLY ON 64-BIT SYSTEMS.

It runs fine on my XP-32bit system and my Win7-32bit system, I'm guessing your Win7 machine has a 64bit processor? Try 32 bit compatability modes or VMs or whatnot.

... anyway that issue is just related to a bag of non-standard tricks of my own creation, not because it was coded in ASM.

The exe in the 2nd PUD editor update should run on pretty much anything ya?

its gooder to hax hard and NEVER get caught!

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: A collaborative PUD editor.
« Reply #27 on: December 30, 2016, 02:24:14 PM »
ok i did a really quick and nasty rebuild on the anticrap thing, gutted half of it and wired it up to do standard importing. Which should fix any compatability issues (i hope).

It does the mini-map black to pink thing, it knows if you're in a game and lists the players, and AFAIK it should detect build hacking, but I can't test that because for the life of me I can't find a copy of that crap build hack program - I havn't even looked for the stupid thing since I was doing all this stuff 7 years ago.

So if someone can test this version and see if it actually works, that would be cool. Just start anticrap then make a server game and build hack something at the start... you should hear a "ding ding ding ding..." then if you tab out there will be a message on it's window telling you ur a naughty boy (or girl).

Anyway, its here: anticrap0.3b

Where's fkn dellam when u need him? xD
« Last Edit: January 05, 2017, 05:17:35 AM by Lambchops »
its gooder to hax hard and NEVER get caught!

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: A collaborative PUD editor.
« Reply #28 on: December 30, 2016, 02:29:05 PM »
ok that one owrks :P

Offline iL

  • Administrator
  • Ogre Mage
  • *****
  • Posts: 1653
    • View Profile
Re: A collaborative PUD editor.
« Reply #29 on: December 30, 2016, 09:05:47 PM »
FYI. The AH version started as something I did in ASM. I had a working prototype AH client and server that tested ok. It did things like send a copy of the player's mini-map back to the server so you could see instantly if they were mapping.

 This was around the time my daughter was born (my son was 16 months) and I was saving to buy our house - working long shifts etc., so I couldn't put the time in.

I had to have a few years off WC2 at that stage. Before I left I sent blid the source code and notes, instructions, tools etc. to continue with. I'm not sure if they ended up using that as a base for the AH we have now or not, but that's how it started.

I think i have that source code. Not sure, i saw several antihack projects, one of them (client-server one) was interesting, but i'd prefer to implement it together with author. But i had no access to author, so my one implemented into war2ploader is one i made myself.
Also, i don't remember any AH projects written on ASM.

Would be very interesting to talk about antihack ideas with you.

The old forum at http://war2.warcraft.org/forum/ has gone :( or at least its down right now.

Looks like it's gone. All we have now is a static copy of a small part: http://occult.war2.ru. Not sure if it's possible to find that there.

Might do a seperate post about that....

.... anyway the build hack detector... I'll re-write a short description here. I named it "anticrap" for lols. It was just a fairly simple proof-of-concept thing. It checks all newly made buildings to see if the player has the pre-requisites - or at least used to have them.

Because of the glitch/feature where you can, for instance, target placement of a dragon roost but not click to place it, then have your fort destroyed then click and place the roost with no fort, it just checks if the player has had ever had a fort, not if they currently have a fort.

There are ways to do it properly, but as this was just a simple demo (i think i wrote it over 2 evenings after work) it just does a quick reality check. If it detects something "suspicious" it sounds a chime and displays a message like "Player Dellam has built a suspicious Dragon Roost" or whatever. You have to tab out to see the message, but you can hear the alarm in game.

It also has a check-box so you can make black display as hot pink on the mini-map, without changing the color of the units themselves.

That project definitely deserves a separate topic here. Looks great!
I also had plans to make monitoring for build hack the same way.
With dropping the hacker by all the clients using my "anticrap".

I didn't plan to deny allowed buidlings on destroying something (or to just make a big timeout, like 1 min).
The main reason for build-hacking is to build dragons right after game starting or w/e. So, not a big deal, but difficult to handle it properly if someone build after destroying the required building. But warning is a good way to handle that.

Unfortunately that project should take much more than 2 evenings after work for me, so i thought to use my time to make antihack for everything instead.

So, i would appreciate your help with that.
I think, i can read a list of buildings for war2 memory (didn't try though and that should require much time for me), but i have no idea how to activate event on placement a new building. I'd just make a timer to check it every second or w/e.
Also, i have no idea if that's easy for several clients to drop one and to keep sync between each other (and probably clean clients with no "anticrap").

I also looked into your anticrap3 with IDA and understood nothing... Is it packed as anticrap2? Did you fix it without the source code and without unpacking?
Would be great to look into your project with comments about addresses in war2 memory.
My dream is to include this (or such) project into my loader for war2.

Also, black2pink on minimap as 1 checkbox is also great solution! Would be a good way to remove the whole black2pink patch from combat at all.

P.S: you looks very experienced in war2 process memory. I tried and i know how difficult for me to find all these addresses. Would be glad to see you as a part of our war2 development team!
« Last Edit: December 30, 2016, 09:15:34 PM by iL »
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.