DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 27, 2016, 01:37:27 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: cities.php - proposed change  (Read 2550 times)
0 Members and 1 Guest are viewing this topic.
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« on: March 01, 2005, 10:47:38 AM »

would it be possible to make the danger-scale a module setting?

cities.php, line19, add before:
Code:
"safechance"=>"Chance to be waylaid on a safe trip, int|50",
"dangerchance"=>"Chance to be waylaid on a dangerous trip, int|66",

cities.php, line 227, change
Code:
$dlevel = ($danger?66:50);
to
Code:
$dlevel = ($danger?get_module_setting("dangerchance"):get_module_setting("safechance"));
Logged

Running for more than three years now:
Kendaer
Guest
« Reply #1 on: March 01, 2005, 11:25:35 PM »

Done.

I made them range,1,100,1 rather than int, but that's pretty much the only change.

I also made the module validate that the safe chance is less than or equal to the dangerous chance Smiley

No lying about relative safety now Smiley
Logged
enderwiggin
Guest
« Reply #2 on: March 02, 2005, 12:26:35 AM »

Should we update race/city modules now, or with the next prerelease?

I don't imagine it would hurt to have that module setting now, even if nothing is calling it.

And along those lines, can we see what new setting(s) we have to put in?
Logged
Kendaer
Guest
« Reply #3 on: March 02, 2005, 07:39:10 AM »

Should we update race/city modules now, or with the next prerelease?

I don't imagine it would hurt to have that module setting now, even if nothing is calling it.

And along those lines, can we see what new setting(s) we have to put in?

Your choice in the first.  His code change above is calling it.

and what do you mean about 'settings we have to put in'?? Everything is listed above.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #4 on: March 02, 2005, 06:10:53 PM »

Enderwiggin, I do believe that those changes stated, are only to cities.php, which is what is directing the Travel...

So, you will not need to update anything... unless you wish for your city to have a higher danger level to get to. Or, if you wish to see those changes now, instead of waiting for the next PR.
« Last Edit: March 02, 2005, 06:12:27 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

enderwiggin
Guest
« Reply #5 on: March 02, 2005, 06:32:19 PM »

I can't read when I'm sleep deprived.  When I first read this thread, I thought the individual city modules would control how dangerous it is to travel there, which made a certain sense to me.  Certain cities should be in more dangerous areas.

However, the world map module already sees to this with terrain.

I've just really been out of it the past few days.  I've been sick and sleep deprived.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
49 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search