SphereCommunity
Question about Fishing and r_water - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Question about Fishing and r_water (/Thread-Question-about-Fishing-and-r-water)



Question about Fishing and r_water - Archaaz - 11-09-2013 10:32 PM

I am trying to add specific fresh and salt water fish to fishing. This is not a make or break feature of my intended shard, but think it would add some flavor, and help to capture the type of shard I am trying to create (more subdued, semi-realistic, RP-focused).

My thought is to make two of the normal larger fish fresh water (trout and salmon), and two salt water (cod and mackerel or sturgeon).

I notice in sphere_types that t_water is defined:

Quote:[TYPEDEF t_water]
TERRAIN = 0a8 0ab
TERRAIN = 0136 0137

But then looking through sphere_region, there is r_default_water (coastal water) and r_water (deep water).

Quote:sphere_region:

[REGIONTYPE r_default_water t_water]
// Default water area resources
// This is not ocean. More like coastlines.
RESOURCES=50.0 mr_nothing
RESOURCES=20.0 mr_fish1
RESOURCES=20.0 mr_fish2
RESOURCES=20.0 mr_fish3
RESOURCES=20.0 mr_fish4
RESOURCES=0.2 mr_footwear

[REGIONTYPE r_water t_water]
// Default water area resources
// This IS ocean. Maybe can find creatures here?
RESOURCES=25.0 mr_nothing
RESOURCES=25.0 mr_fish1
RESOURCES=25.0 mr_fish2
RESOURCES=25.0 mr_fish3
RESOURCES=25.0 mr_fish4
RESOURCES=1.5 mr_fish_highly_peculiar
RESOURCES=1.5 mr_fish_prized
RESOURCES=1.5 mr_fish_wondrous
RESOURCES=1.5 mr_fish_truly_rare
RESOURCES=0.5 mr_sos_bottle

I assume r_default_water denotes tiles (items) 1796-17B2, and r_water is tiles 0A8-0Ab. Is this defined somewhere within Sphere, or hard-coded?

I have been editing map0 with CentrEd, and had thought to perhaps take 0136 and 0137 (which do not seem to be used?) and to make an r_fresh_water, then replace all the tiles in the rivers and lakes with those tiles. In which file would I define this new fresh water, and how? Of course the water edging tiles 179D-17B2 might cause some problems with this method, as they would also have to be used for coastal regions.

My fall back is to simply allow trout and salmon to be caught in r_default_water, as they can at times be found in salt water. Or to simply say to heck with it and leave it as is with generic fish.

Is there an easier method of doing this, or am I on the right track? Or should I just leave it as is? Thanks in advance.


RE: Question about Fishing and r_water - Ben - 11-09-2013 11:11 PM

r_default_water and r_water are defined in your regions events... just set the apropriate event to the region you wish. There is nothing hardcoded about what you need there, your just looking in the wrong place.


RE: Question about Fishing and r_water - Archaaz - 11-10-2013 02:14 AM

(11-09-2013 11:11 PM)Ben Wrote:  r_default_water and r_water are defined in your regions events... just set the apropriate event to the region you wish. There is nothing hardcoded about what you need there, your just looking in the wrong place.

Ah, many thanks! Still navigating my way around the various files. Where are the region events located?


RE: Question about Fishing and r_water - XuN - 11-10-2013 02:46 AM

maps/sphere_mapX.scp:

Code:
[AREADEF a_cave_1]
EVENTS=r_default,r_default_rock,r_default_water,r_default_tree,r_default_grass  //This is your line.
NAME=cave
GROUP=Mines & Caves
FLAGS=REGION_FLAG_NOBUILDING
P=2367,942,0,0
RECT=2373,900,2395,928,0
RECT=2395,903,2409,919,0
RECT=2373,928,2383,937,0
RECT=2359,927,2373,945,0



RE: Question about Fishing and r_water - Mordaunt - 11-10-2013 03:14 AM

The events you have already found, as illustrated in the first post...


RE: Question about Fishing and r_water - Archaaz - 11-10-2013 02:25 PM

Thanks for the answers, everyone! I was confused thinking it involved tiles rather than regions, and by the fact that certain water tiles were not listed as terrain in t-water, but now see that they are items with the t_water type. I understand now.

One more question, can regions/areas be defined and nested within other regions and have different events attributed to them? I notice that rooms seem to work in this manner, and of course all areas within the greater Felucca area. For example, if a river or other body of water lies within, say, The Northern or Yew Territories, can I map out a new area for the river, and swap my new r_fresh_water event for r_default_water? Will the larger area cause it to default to r_default_water? Or do I need to redefine the coords of the original region?

Finally, just for my understanding, all water listed in the events in the map0 file seems to be r_default_water. Where and how does r_water come into play?


RE: Question about Fishing and r_water - XuN - 11-10-2013 06:08 PM

Each AREADEF has its own events, and they are not shared to the areadefs inside, to see an example open sphere_map2.scp and take a look to a_lbr2 (Ilshenar), and then just look at any other area... all of them are 'inside' a_lbr2, but each one of them has its own events if specified, if not... it has no events. So if you go to Northern Territory and use r_default_water and then you go to Britain (wich is inside) and you put there r_water, each region will have different water types.

And probably r_water was created for ocean water but never implemented in sphere_mapx.scp files.


RE: Question about Fishing and r_water - Archaaz - 11-10-2013 09:16 PM

Ah, thanks again! Just what I was hoping. Also, thanks for showing me the sphere_mapx.scp file. I was wondering where the regions, areas, and room definitions were listed.