Author Topic: Dan's Dog  (Read 11837 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Dan's Dog
« on: September 04, 2007, 02:05:23 AM »
It seems Dan's Dog really is in the game. When I first saw the graphics for it, I thought they were just something silly that ended up in the files, but never got into the game. I'd never seen it before after all. But when I read Mcshay's post about very rare sightings, I decided to go looking. It seems the game does actually create the howling dog under fairly rare circumstances. I'm attaching a test DLL below that will recreate those circumstances.


The dog will appear when a meteor impacts if all the following conditions hold:
1) the impact leaves a scorch mark
2) the impact occurs exactly at a multiple of 32768 game ticks (about 327 marks)
3) the tile at the point of impact belongs to the third terrain type (for the built in maps, this is the sand tiles, however it need not be, and can be adjusted in the map file. See the map specification for details on the "TerrainType")
4) the tile is not currently occupied by a unit

As an additional note, the routine that generates the dog belongs to the Unit class for the Meteor, and this processing function will only be called when (unitIndex XOR tick) MOD 8 != 0. Hence the time condition can only hold for meteors that have a unit index that is a multiple of 8.



I did a few mem hacks in the DLL to bump up the tick to just short of 32768, and then spawned a bunch of meteors, and played with some of their internal flags and timers so they appear immediately, rather than after the standard 10 mark delay. I'm impatient.  :D


Here's the code I used:

Code: [Select]
char MapName[]  	= "cm02.map";    // The .map file used for this level
char LevelDesc[]  = "Dan's Dog";    // Description appearing in the game list box
char TechtreeName[]  = "Multitek.txt";   // File to use for the tech tree
SDescBlock DescBlock = { Colony, 2, 12, false }; // Important level details


int InitProc()
{
// Center view over about where Dan's Dog appears
Player[0].CenterViewOn(35, 10);

// Bump up the game time
*(int*)(0x56EB1C) = 32768 - 76;

return 1; // return 1 if OK; 0 on failure
}

void AIProc()
{
static int i = 0;

if (i < 100)
{
  Unit meteor;
  TethysGame::CreateUnit(meteor, mapMeteor, LOCATION(35 + (i % 25), 4 + (i / 25) * 5), 6, (map_id)3, 0);
  int* meteorUnit = (int*)((*(int*)0x54F848) + meteor.unitID * 120);
  int* meteorUnitFlags = (int*)((char*)meteorUnit + 0x44);
  int* meteorUnitTimer = (int*)((char*)meteorUnit + 0x3C);
  *meteorUnitFlags |= 0xC000;
  *meteorUnitTimer = 5;
  i += 5;
}
}
« Last Edit: September 05, 2007, 02:02:38 PM by Hooman »

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Dan's Dog
« Reply #1 on: September 04, 2007, 03:00:28 AM »
Nice work :)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Dan's Dog
« Reply #2 on: September 04, 2007, 07:57:39 AM »
It's real! It's real! Woot!
You're amazing Hooman!

Now work on SantaWalking!
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Dan's Dog
« Reply #3 on: September 04, 2007, 11:27:41 AM »
Care to share your .dll file with us so we can see Dan's Dog?
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Dan's Dog
« Reply #4 on: September 04, 2007, 11:28:09 AM »
Really amusing :P  

Offline Sl0vi

  • Sr. Member
  • ****
  • Posts: 464
Dan's Dog
« Reply #5 on: September 04, 2007, 11:34:41 AM »
Nice discovery :D
!!!YAY!!!

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Dan's Dog
« Reply #6 on: September 04, 2007, 01:06:55 PM »
Quote
Care to share your .dll file with us so we can see Dan's Dog?
Check the bottom of his post.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Dan's Dog
« Reply #7 on: September 04, 2007, 01:17:20 PM »
Lol, yes, the DLL file was attached. And I posted all the relevant code for anyone with a compiler and SDK too.


I still have yet to find any trace of Santa though.  <_<
 

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Dan's Dog
« Reply #8 on: September 04, 2007, 03:24:29 PM »
lol, I somehow always miss the attachments outside of the file forum :P
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Dan's Dog
« Reply #9 on: September 04, 2007, 04:15:11 PM »
Awesome!

Now we know that Dan's Dog does indeed exist, and that *(int*)(0x56EB1C) is the tick counter! :P

(Assuming I ever need a way to reset the time, and that it will work, this should prove to be very useful)

Offline White Claw

  • Hero Member
  • *****
  • Posts: 854
Dan's Dog
« Reply #10 on: September 04, 2007, 06:56:33 PM »
Geeze Hooman, why don't you just re-write the source code for OP2?  :P  

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Dan's Dog
« Reply #11 on: September 05, 2007, 09:12:29 AM »
Thought about it, but I don't think I really have the time or patience for such a large project. Especially not with school starting in a few days. I just use this game as an excuse for short doses of assembly.  :P

But yes, a remake would definately be a good idea. I think an Outpost 2 remake would be far better than a remake of Outpost 1, or an attempt at an Outpost 3. After all, Outpost 2 is the reason most people are here, and why the site has been around for so long.


I'm pretty sure that tick info has already been posted. If not explicitly, then in the OllyDbg file that gets posted/updated from time to time. There's probably well over 1000 named memory locations in that file now. (Some are data, some are functions). Heck, I think it was approaching 2000.
 
« Last Edit: September 05, 2007, 09:14:40 AM by Hooman »

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Dan's Dog
« Reply #12 on: September 05, 2007, 10:52:55 AM »
Outpost 2 remake would rock :)

Offline White Claw

  • Hero Member
  • *****
  • Posts: 854
Dan's Dog
« Reply #13 on: September 05, 2007, 06:53:44 PM »
I think I might be able to manage an OP1 but, unfortunately I don't think I have the time/ability to undertake an OP2 remake. And the way people agree on and support eachother's creative work on this board makes me not want to suffer working as a group. In fact, what I just said will probably give someone cause to write a reply.  :P

In either case, when I get back to my comp I'm going to see if I can strong-arm windows into letting me make something that will display terrain. And who knows, if I can make it open ended enough, I might be able to add things like units. I already plan on making the tile support for the terrain a bit broader than OP1.

Heck, I'm still just an "Outpost Worker"  :lol: Baby steps...
« Last Edit: September 05, 2007, 06:55:27 PM by White Claw »

Offline Freeza-CII

  • Administrator
  • Hero Member
  • *****
  • Posts: 2308
Dan's Dog
« Reply #14 on: September 06, 2007, 03:00:41 PM »
let me ask yall a question do we really need remakes of op2.  Some thing that seems to me to need the source for that to happen and its non exsistant. any way off topic

Good work as always hooman.

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Dan's Dog
« Reply #15 on: September 06, 2007, 03:05:03 PM »
Quote
Some thing that seems to me to need the source for that to happen and its non exsistant.
Not having the source would be the reason for remaking it. If we had the source, we could just modify whatever the hell we please, rewriting it from scratch wouldn't be necessary. Hacking OP2 takes a damn long time, and I'm willing to bet that remaking OP2 would end up, in the long run, being more effective than hacking OP2 for every little thing we wanted to change.
« Last Edit: September 06, 2007, 03:05:37 PM by Arklon »

Offline White Claw

  • Hero Member
  • *****
  • Posts: 854
Dan's Dog
« Reply #16 on: September 06, 2007, 03:54:38 PM »
Quote
Not having the source would be the reason for remaking it.
Agreed, but I think it would meet resistance anyway because people would think it's competing against Genesis.

Anyhow, definitely off topic. Back to Dan's Dog!

Offline dazjorz

  • Newbie
  • *
  • Posts: 18
Dan's Dog
« Reply #17 on: June 15, 2009, 08:35:06 PM »

Offline Kayedon

  • Sr. Member
  • ****
  • Posts: 378
Dan's Dog
« Reply #18 on: June 15, 2009, 08:59:26 PM »
What the goatfruit dazjorz?
"Trust me, I'm crazy."

Offline dazjorz

  • Newbie
  • *
  • Posts: 18
Dan's Dog
« Reply #19 on: June 20, 2009, 11:25:26 AM »
Quote
What the goatfruit dazjorz?
I revived this ancient thread since it was talking about an OP2 remake :P

Offline Hidiot

  • Hero Member
  • *****
  • Posts: 1018
Dan's Dog
« Reply #20 on: June 20, 2009, 12:13:06 PM »
/me points out that the topic of game remake was the of-topic of this topic. The topic of this topic was Dan's Dog.

Get that?
"Nothing from nowhere, I'm no one at all"

Offline Kayedon

  • Sr. Member
  • ****
  • Posts: 378
Dan's Dog
« Reply #21 on: June 20, 2009, 12:56:08 PM »
Just because it's about an OP2 remake or MENTIONED IT in this case doesn't mean it deserves to be brought back from the grave. Topics, projects, and ideas die for a reason.
"Trust me, I'm crazy."

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 711
Dan's Dog
« Reply #22 on: June 20, 2009, 09:30:14 PM »
Don't we all want to bring things back form the dead (like op2 itself :P). Just wondering, do you have a picture of this (playing on the fact it has now been brought back form the dead)?
I AM YOUR PET ROCK!!!!!!

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Dan's Dog
« Reply #23 on: June 20, 2009, 10:58:18 PM »
Download the test level at the bottom of the first post.

Now stop necro'ing things or else.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Dan's Dog
« Reply #24 on: March 16, 2011, 07:00:26 PM »
Quote
Outpost 2 remake would rock :)
Agree X 1000^1gogol^1gogol

thats a LOT of zeros


Nice work Hooman.. Now if we can just figure out WHY they did that?