May 17, 2024, 07:32:17 am
Username:

Password:

Topic: Gravedigging in encounters.  (Read 1550 times)

Wind_Drift

  • Supporter
  • Posts: 309
  • Section 8
    • View Profile
Gravedigging in encounters.
« on: January 06, 2016, 07:13:36 am »
It's in the code since 2238 (I think), yet as far as I know was never implemented in game.  The loot table is WAY reduced from footlockers in value, and they only spawn at around a quarter of the rate footlockers do, and only in Mountain encounters.

It's a few minute fix, and the only reason I see for not doing it is "We don't want to"... which would be perfectly acceptable.

We tell noobs to shovel shit and lift boxes, why not dig holes?

Also, because I regularly tell people to put in work before making stupid suggestions, I'll take my own advice;

encounter_containers.fos
Code: [Select]
uint GetContainerType(Map& map)
{
int locPid = map.GetProtoId();
if(locPid >= MAP_CityEncounter1 && locPid <= MAP_CityEncounter12 || locPid >= MAP_SkyscraperEncounter1 && locPid <= MAP_SkyscraperEncounter5 )
return EC_TYPE_CONTAINER;
if(locPid >= MAP_MountainEncounter1 && locPid <= MAP_MountainEncounter9 )
return EC_TYPE_GRAVE;
else
return EC_TYPE_NONE;
}
« Last Edit: January 06, 2016, 07:16:42 am by Wind_Drift »

Slowhand

  • Posts: 280
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Gravedigging in encounters.
« Reply #1 on: January 06, 2016, 08:27:56 am »
It's in the code since 2238 (I think), yet as far as I know was never implemented in game.  The loot table is WAY reduced from footlockers in value, and they only spawn at around a quarter of the rate footlockers do, and only in Mountain encounters.

It's a few minute fix, and the only reason I see for not doing it is "We don't want to"... which would be perfectly acceptable.

We tell noobs to shovel shit and lift boxes, why not dig holes?

Also, because I regularly tell people to put in work before making stupid suggestions, I'll take my own advice;

encounter_containers.fos

I did not test it, but I think that what you wanted to do is:
Code: [Select]
uint GetContainerType(Map& map)
{
int locPid = map.GetProtoId();
if ( (ocPid >= MAP_CityEncounter1 && locPid <= MAP_CityEncounter12) || (locPid >= MAP_SkyscraperEncounter1 && locPid <= MAP_SkyscraperEncounter5) )
return EC_TYPE_CONTAINER;
if (locPid >= MAP_MountainEncounter1 && locPid <= MAP_MountainEncounter9)
return EC_TYPE_GRAVE;
else
return EC_TYPE_NONE;
}

« Last Edit: January 06, 2016, 08:29:29 am by Slowhand »

Wind_Drift

  • Supporter
  • Posts: 309
  • Section 8
    • View Profile
Re: Gravedigging in encounters.
« Reply #2 on: January 06, 2016, 02:11:08 pm »
It's in the code since 2238 (I think), yet as far as I know was never implemented in game.  The loot table is WAY reduced from footlockers in value, and they only spawn at around a quarter of the rate footlockers do, and only in Mountain encounters.

It's a few minute fix, and the only reason I see for not doing it is "We don't want to"... which would be perfectly acceptable.

We tell noobs to shovel shit and lift boxes, why not dig holes?

Also, because I regularly tell people to put in work before making stupid suggestions, I'll take my own advice;

encounter_containers.fos

I did not test it, but I think that what you wanted to do is:
Code: [Select]
uint GetContainerType(Map& map)
{
int locPid = map.GetProtoId();
if ( (ocPid >= MAP_CityEncounter1 && locPid <= MAP_CityEncounter12) || (locPid >= MAP_SkyscraperEncounter1 && locPid <= MAP_SkyscraperEncounter5) )
return EC_TYPE_CONTAINER;
if (locPid >= MAP_MountainEncounter1 && locPid <= MAP_MountainEncounter9)
return EC_TYPE_GRAVE;
else
return EC_TYPE_NONE;
}

No, I did what I wanted to do. I tested what I posted pretty thoroughly.

Slowhand

  • Posts: 280
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Gravedigging in encounters.
« Reply #3 on: January 06, 2016, 03:49:29 pm »
I looked upon it again, it should work without the parentheses as you wrote.

Note: My Reloaded SDK , the version 2, had CityEncounter defines only up to MAP_CityEncounter10.

Wind_Drift

  • Supporter
  • Posts: 309
  • Section 8
    • View Profile
Re: Gravedigging in encounters.
« Reply #4 on: January 06, 2016, 05:28:19 pm »
I looked upon it again, it should work without the parentheses as you wrote.

Note: My Reloaded SDK , the version 2, had CityEncounter defines only up to MAP_CityEncounter10.

Yeah, and in my hours of actual testing I found that lockers weren't spawning in maps 11 and 12. Those two are defined a bit further down after the Coastal City encounters, and while there are two cave maps between them they don't have the proper entires to spawn a container as far as I've been able to tell.

 ;D

With the parenthesis, without, doesn't matter. I'm not asking for coding help (yours won't compile as is anyway), as there's more than one way to skin a Gecko. The basic functionality is there, just not working or implemented, I'm suggesting it BE implemented regardless of how and by whom.

I mean, I'm not you, but I think what you wanted to do was apologize for being a condescending dick.

Apology accepted.
« Last Edit: January 06, 2016, 06:40:05 pm by Wind_Drift »