The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about Fishing and r_water
Author Message
Archaaz
Journeyman
*

Posts: 98
Likes Given: 12
Likes Received: 4 in 4 posts
Joined: Aug 2013
Reputation: 1



Post: #1
Question about Fishing and r_water
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.
11-09-2013 10:32 PM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #2
RE: Question about Fishing and r_water
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.

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
11-09-2013 11:11 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Ben's post
Archaaz
Journeyman
*

Posts: 98
Likes Given: 12
Likes Received: 4 in 4 posts
Joined: Aug 2013
Reputation: 1



Post: #3
RE: Question about Fishing and r_water
(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?
(This post was last modified: 11-10-2013 02:34 AM by Archaaz.)
11-10-2013 02:14 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: Question about Fishing and r_water
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
11-10-2013 02:46 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Question about Fishing and r_water
The events you have already found, as illustrated in the first post...

[Image: 2nis46r.jpg]
11-10-2013 03:14 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Mordaunt's post
Archaaz
Journeyman
*

Posts: 98
Likes Given: 12
Likes Received: 4 in 4 posts
Joined: Aug 2013
Reputation: 1



Post: #6
RE: Question about Fishing and r_water
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?
11-10-2013 02:25 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #7
RE: Question about Fishing and r_water
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.
11-10-2013 06:08 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
Archaaz
Journeyman
*

Posts: 98
Likes Given: 12
Likes Received: 4 in 4 posts
Joined: Aug 2013
Reputation: 1



Post: #8
RE: Question about Fishing and r_water
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.
11-10-2013 09:16 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)