Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tibiadrome mechanics #3323

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

mdbeng
Copy link
Contributor

@mdbeng mdbeng commented Feb 4, 2025

Description

This will add the missing feature from tibia summer update 2021. This is only working in thais arena ( map will be released for you guys to test ).

My code is creating the necessary tables and rows with the script ( before moving to schema i want to make sure its all good )

Monster damage scaling
2 Daily Mechanics ( they will change every server save )
Highscore will be placed in the leaderboards and persist over server saves.
Rewards are set to: 5 days to end rotation. 1 drume potion to each top 10.
Rewards will be handed to the store inbox ( i was trying to set them up to receive them in the mailbox but was creating a crash )
Modified Appearances in order for the mechanics to work i found out the unused appearances had wrong attributes.

I will recommend to not modify the core of the script.

What is missing?
Add arenas over the other cities. Right now is only working at thais.
And testing. but everything should be 100%

What about the map?
Im working on exporting the map configuration to release it. Sorry in advance. im not a great mapper so my knowledge is not that great.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

This was tested with a lot of different circunstances.

Test Configuration:

  • Server Version: 13.4 / 14.5
  • Client: 13.4 / 14.5
  • Operating System: Windows / Linux

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Map isnt released and im missing one mechanic with monsters.
got to see further improvements for nerf or buff
@majestyotbr majestyotbr changed the title Tibia Drome 100% functioning feat: tibiadrome mechanics Feb 4, 2025
@Maska1991
Copy link

Eggs destoyed grounds
Outfit_Golden_Male_Addon_2

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 5, 2025

Eggs destoyed grounds
Outfit_Golden_Male_Addon_2

You have to use my map in order to work, I'm working on bringing up the map. Sorry for the inconvenience

@Maska1991
Copy link

Ok, im waiting.

@murilo09
Copy link
Contributor

murilo09 commented Feb 5, 2025

@mdbeng are you on discord?

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 5, 2025

https://github.com/mdbeng/MapsRelease/releases/download/map/tibiadrome.otbm

Sorry in advance for the link, i don't have access to discord so i can't upload it there.

@karlschmidt33
Copy link

Actually this is far for being completed but it's a good start, some suggestions:

  • Do the startup as a globalevent instead an addvent on the script, as it may lead to crashes.
  • Do a migration for the SQL files, as it may consume SQL data on each startup when you don't need to do it.
  • Use global variables instead local variables.

Also i separate each script by type, would be better to read/understand.

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 5, 2025

Yes I mentioned that this db creation is to test it then we can migrate the db to the schema if it is working as intended.

@Maska1991
Copy link

stack traceback:
[C]: in function 'getName'
...ry-main\data-otservbr-global/monster\drome\Hoodinion.lua:99: in function <...ry-main\data-otservbr-global/monster\drome\Hoodinion.lua:96>
[C]: in function 'createMonster'
...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:91: in function 'spawnMonsters'
...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:169: in function <...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:166>

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 5, 2025

stack traceback:
[C]: in function 'getName'
...ry-main\data-otservbr-global/monster\drome\Hoodinion.lua:99: in function <...ry-main\data-otservbr-global/monster\drome\Hoodinion.lua:96>
[C]: in function 'createMonster'
...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:91: in function 'spawnMonsters'
...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:169: in function <...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:166>

Make sure u have all the commits that error is not happening here

@Maska1991
Copy link

I download second time files. System works but in console have this error.
Character Die dont teleport and eggs still destroy grounds. I have your map.

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 5, 2025

I download second time files. System works but in console have this error.
Character Die dont teleport and eggs still destroy grounds. I have your map.

I just uploaded a new commit to fix the destroy ground. And the teleport I'm checking right now. Please test it

Have in mind u have to set the new appearances in your client as well.

@Maska1991
Copy link

Outfit_Golden_Male_Addon_2
Character still time die.

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 6, 2025

I've changed the way the position is retrieved giving a better performance. avoiding checking players online and just checking within the area. So as giving global variables to be used by the mechanics and future development if needed.

The entire system has to be tested and reviewed once again before doing the following:
database migration and include it into the schema.

@Maska1991
Copy link

Maska1991 commented Feb 6, 2025

Anybody can test it? i still died here, maybe i do something wrong.
Outfit_Golden_Male_Addon_2
and still have errors in console about monster ,,Hoodinion"

main\data-otservbr-global/monster\drome\Hoodinion.lua:96>
[C]: in function 'createMonster'
...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:91: in function 'spawnMonsters'
...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:169: in function <...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:166>

rest working good

Outfit_Golden_Male_Addon_2

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 6, 2025

Anybody can test it? i still died here, maybe i do something wrong. Outfit_Golden_Male_Addon_2 and still have errors in console about monster ,,Hoodinion"

main\data-otservbr-global/monster\drome\Hoodinion.lua:96> [C]: in function 'createMonster' ...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:91: in function 'spawnMonsters' ...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:169: in function <...ain\data-otservbr-global/scripts\systems\tibia_drome.lua:166>

rest working good

Outfit_Golden_Male_Addon_2

thanks for testing, don't worry about the death because i havent mess with it yet. thing is i have a mod on my branch that the player doesnt die within pvp zones, but canary doesnt have it so i'll fix that as soon as the entire system is stable. im currently testing this script with a base of 100 players online everything smooth so far no crash or major issues.

@Maska1991
Copy link

Still time have error with that monster but fear, drunk, eggs and others working Perfect.

@majestyotbr
Copy link
Contributor

Only repository mantainers can update the appearances.dat.

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 6, 2025

Only repository mantainers can update the appearances.dat.

Copy, this pr Im not expecting to go through the pr is for the contributor to make further developments so eventually we can have it.

@paczielny
Copy link

We still don't have a way to handle death and loss of exp?

@Maska1991
Copy link

Yes still time you died, and some errors with script.

@paczielny
Copy link

Yes still time you died, and some errors with script.

There is no error with the scripts... I don't know what you're doing wrong

@Maska1991
Copy link

I dont know what is wrong too. Monster hooding generate error in console but your question is about died.

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 7, 2025

I dont know what is wrong too. Monster hooding generate error in console but your question is about died.

Theres no error here either. i will just update the pr, i will work on the death today and update the appearances to stay in canary's guidelines and see if I can make it work without changing appearances

Copy link

sonarqubecloud bot commented Feb 8, 2025

@mdbeng
Copy link
Contributor Author

mdbeng commented Feb 8, 2025

If you have suggestions, a way to improve the system, feel free to speak up. Or if I made a mistake, point it out. Thanks.

Next: death penalties in the arena.

@Maska1991
Copy link

At the moment without erros, working good. Time to fix death and if it possible add on area infinity runes and potions like RL tibia.

Copy link
Contributor

@phacUFPE phacUFPE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do this in a simpler way, using encounter and zones, I think it will be more practical, easier to understand and others maintain.

Also fear mechanic already exists, if you are doing the condition as soulwar, you should take a look there to avoid recreating and keeping two same fear mechanics, but in different locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants