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:
  • 1 Votes - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ROOMDEF Flags
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
ROOMDEF Flags
I found this page on wiki:

http://wiki.sphere.torfo.org/index.php/ROOMDEF

I tried to set the flags for a ROOMDEF but flags and other keys don't work.
Triggers too.
Is that a bug?
04-23-2013 07:40 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: ROOMDEF Flags
I think a ROOMDEF doesn't have EVENTS, and therefore doesn't have triggers. FLAGS should work though.
04-23-2013 08:34 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #3
RE: ROOMDEF Flags
(04-23-2013 08:34 AM)RanXerox Wrote:  I think a ROOMDEF doesn't have EVENTS, and therefore doesn't have triggers. FLAGS should work though.

Flags don't work, i tried the numeric and defname ways.
04-23-2013 09:08 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #4
RE: ROOMDEF Flags
What exact sphereserver version are you using? Also, show me your roomdef that does not work.

Nevermind, I tried a few experiments... FLAGS in ROOMDEFS are not used.
(This post was last modified: 04-23-2013 09:38 AM by RanXerox.)
04-23-2013 09:14 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #5
RE: ROOMDEF Flags
This is the region.

Code:
[ROOMDEF a_casa_2_ls]
NAME=Inn
GROUP=Lake Shire
FLAGS=REGION_FLAG_NOBUILDING|REGION_FLAG_UNDERGROUND|region_antimagic_gate|regio​n_antimagic_teleport|region_antimagic_recall_in|region_flag_no_pvp|region_flag_s​afe|region_flag_nodecay|region_antimagic_all
P=1228,1173,-25,2
RECT=1216,1170,1231,1183,2

My sphere version:

Code:
Sphere Version 0.56b-Nightly [WIN32] by www.sphereserver.com, compiled at Dec 17 2012 (00:05:12), internal build #1552

So the wiki is wrong?
(This post was last modified: 04-23-2013 10:38 AM by Mordaunt.)
04-23-2013 09:40 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #6
RE: ROOMDEF Flags
I am not certain... the code logic is complex... The wiki may be partially correct, but missing some facts.

I suspect that FLAGS (and other things) in areadefs (or roomdefs) that are nested, are discarded:

Code:
+---------------------+
| areadef A           |
|  +----------------+ |
|  | roomdef B      | |
|  |                | |
|  +----------------+ |
+---------------------+

I think when flags are computed for the roomdef B, they are dropped because it is entirely within areadef A...

Code:
+---------------------+
| areadef A           |
|       +----------------+
|       | roomdef B      |
|       |                |
|       +----------------+
|                     |
+---------------------+
In the above example, they might work... can you test it?
04-23-2013 11:20 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #7
RE: ROOMDEF Flags
(04-23-2013 09:40 AM)Rizz Wrote:  So the wiki is wrong?
Yes, and I've reported on bugtracker about events on roomdef...
Ben was roughly clear that it don't have events.

But they don't want to fix the wiki...
I think ROOMDEF could have EVENTS, because if you create a new AREADEF, you will need to set FLAGS and EVENTS.
So ROOMDEF would get flags of AREADEF where is it and you could set only EVENTS.

So no need to put FLAGS on all ROOMDEF.
If you need Flags, use AREADEF, if you need just EVENTS should use ROOMDEF.

Thats my opinion.

Code:
+---------------------+
| areadef A           |
|  +----------------+ |
|  | roomdef B      | |
|  | event +r_test  | |
|  +----------------+ |
+---------------------+
Where r_test gives skillgain bonus for the player who enters and keeps using the same flags from areadef, that is better than create the room as areadef and give the same flags.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 04-23-2013 11:54 AM by Extreme.)
04-23-2013 11:48 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #8
RE: ROOMDEF Flags
In my opinion, roomdefs should replace areadefs flags. If i have a big city and i need to change the flags for just a room... why create another areadef over an existant areadef?
04-23-2013 08:45 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

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



Post: #9
RE: ROOMDEF Flags
You should ALWAYS be subject to events from top level areas, but areas with in areas should imo allow additional events to be added or existing ones modified. The subject of events on roomdefs is not one I will get into since I never use them anway, but should they exist or be modified to exist then those events should also be aditional to (or be modifying) events added by the area the room is in.

Just my 2 cents....
All academic if roomdefs can't have events anyway

[Image: 2nis46r.jpg]
04-24-2013 01:31 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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