Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Server restart initiated ...
- Traceback (most recent call last):
- File "d:\muddev\evennia\evennia\commands\cmdsethandler.py", line 174, in import_cmdset
- module = import_module(modpath, package="evennia")
- File "C:\Programming\Python3\lib\importlib\__init__.py", line 127, in import_module
- return _bootstrap._gcd_import(name[level:], package, level)
- File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
- File "<frozen importlib._bootstrap>", line 983, in _find_and_load
- File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
- File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
- File "<frozen importlib._bootstrap_external>", line 728, in exec_module
- File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
- File ".\commands\default_cmdsets.py", line 18, in <module>
- from commands import command
- File ".\commands\command.py", line 10, in <module>
- from world.skillsets import training
- File "D:\muddev\hecate\world\skillsets.py", line 7, in <module>
- rb = skill_level(i, 'easy')
- NameError: name 'skill_level' is not defined
- Compile/Run error when loading cmdset 'commands.default_cmdsets.SessionCmdSet'.",
- (Traceback was logged 19-08-08 03:54:57-04)
- Error encountered for cmdset at path 'commands.default_cmdsets.SessionCmdSet'.
- Replacing with fallback 'evennia.commands.default.cmdset_session.SessionCmdSet'.
- ... Server restarted.
- '''
- # In mygame\world\skillsets.py
- easy_rb = []
- average_rb = []
- difficult_rb = []
- impossible_rb = []
- for i in range(1, 1_001):
- rb = skill_level(i, 'easy')
- easy_rb.append(rb)
- rb = skill_level(i, 'average')
- average_rb.append(rb)
- rb = skill_level(i, 'difficult')
- difficult_rb.append(rb)
- rb = skill_level(i, 'impossible')
- impossible_rb.append(rb)
- def skill_level(self, rank, difficulty):
- '''
- RANK += RANK BONUS PER RANK
- --------------------------
- 1 to 10 += 3
- 11 to 30 += 2
- 31 to 50 += 1
- 51 to 100 += 0.5
- 101 to 150 += 0.25
- 151 to 200 += 0.125
- 201 to 500 += 0.0625
- 501 to 1,000 += 0.025
- 1,001 to infinity += 0.01
- '''
- #Temp Values
- rb = 0
- rank = 100
- #Formula
- if rank:
- r = rank if rank < 10 else 10
- rb += (3 * r)
- if rank >= 11:
- r = rank - 10 if rank < 30 else 10
- rb += (2 * r)
- if rank >= 31:
- r = rank - 30 if rank < 50 else 20
- rb += (1 * r)
- if rank >= 51:
- r = rank - 50 if rank < 100 else 50
- rb += (0.5 * r)
- if rank >= 101:
- r = rank - 100 if rank < 150 else 50
- rb += (0.25 * r)
- if rank >= 151:
- r = rank - 150 if rank < 200 else 50
- rb += (0.125 * r)
- if rank >= 201:
- r = rank - 200 if rank < 500 else 300
- rb += (0.0625 * r)
- if rank >= 501:
- r = rank - 500 if rank < 1000 else 500
- rb += (0.025 * r)
- if rank >= 1001:
- r = rank - 1000
- rb += (0.01 * r)
- '''
- 15% RB loss per difficulty.
- At rank 100:
- Easy(100%) 115 RB
- Average(85%) 97.75 RB
- Difficult(70%) 80.5 RB
- Impossible(55%) 63.25 RB
- '''
- if difficulty == 'easy':
- rb *= 1
- elif difficulty == 'average':
- rb *= 0.85
- elif difficulty == 'difficult':
- rb *= 0.7
- elif difficulty == 'impossible':
- rb *= 0.55
- return rb # Return if any rank.
- return None # Return if no rank.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement