![]() |
Warnings while compiling 56c and default combat messages - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Warnings while compiling 56c and default combat messages (/Thread-Warnings-while-compiling-56c-and-default-combat-messages) |
Warnings while compiling 56c and default combat messages - Mad Gunther - 06-08-2016 06:18 AM Hello everybody, has someone tried to compile 56c-20160410 (latest, 9 april) version as release? I got 332 warnings wich is a little bit unexpected, plus when compiling older nightlies versions from the same year and having 0 warnings. Everything is done like it should, i uploaded the version to a personal git repo, cloned it to my pc, the path setting is alright, i set the output to release and got all these warnings. If i compile it as a nightly i have no warnings. Both compiled versions works good so i came to the idea to leave it as a nightly version, wich it would be the same thing that 56c release, doesn´t it? I dont care what the console says while functionality keeps the same. I´m using visual studio 2010 on a windows 7 machine, but i don´t think that deal much with it. I have no clue about it, that´s why i ask to the voice of wisdom (Coming here is my last choice, don´t want to bother you so much hehe). And for the other one question some of you are gonna kill but whatever... let´s give it a try... can i set back again the defaults combat messages? ^^. Like: you hit <src.name> in the head! and so on.. Yeah i know almost the whole community are against them and they are pretty much useless stuff, that´s why they got deleted, but i would to have option of turning them on or off with detail command, i´m just like these freak restorers that get deep into every single detail, it is insane. I don´t see where to start since there´s no reference in @GetHit or @Hit to the hitted part, so.. what´s left to do? it is just possible adding the hardcoded behaviour into source? Like always thanks in advance, Cheers! RE: Warnings while compiling 56c and default combat messages - Coruja - 06-12-2016 12:18 PM that's strange, some months ago I was using VS2010 and it compile perfectly with 0 warnings. And it still working fine now using latest 56d nightly on VS2015 try check if your visual studio settings are correct, or check if you doesn't changed any file accidentally (because on C language you can break the compiler or get millions of errors just because an single wrong word). Also check if these messages are really errors or just some VS warnings, because warnings are classified by level 1-4 and VS will show only warnings that match your VS settings and as far I remember, you won't find any reference about these combat messages because they are exactly what you said: just some random messages. The char doesn't aim to an specific body part on combat and these messages are just random texts with no functionality, that's why they got removed. But you can get this "feature" back just using an simple script to add some random texts on trigger @Hit Code: [EVENTS e_combat_message] //add this event on chars RE: Warnings while compiling 56c and default combat messages - Mad Gunther - 06-13-2016 11:58 AM Hello Coruja, Thanks very much for your answer! The same day i wrote this topic i did this: Code: /////////////combat def messages//////////////////// It´s the same as you wrote but with the proper messages added, plus taking in count attacker and defender to display the hitted body part like the old style. One of the cons of this method is that you can not play with %ss strings to send messages like you hit <src.name>´s (you can´t add ´s to the name in src.sysmessage), but well that aint too much to piss me off, i can deal just with <src.name> perfectly. The other one is... This messages weren´t displayed while checking body parts in source?, if i remember well in 56b source they still are and there is a switch to iqty -1 or something like that and it was rolling for the hitted part, then when body part was selected it displayed both messages to players, or to players from npcs.... I saw it some days ago but i hace to check it out again to make sure, but if you remember well it has to work like that. But I´m asking that because it is pretty annoying to read a: <name> hit you in your throat ! and then inmediataly see <name> damaged your iron platemail legs! hahaha. If it was working like that (weird) then the code above is more than good, but if not it gets very complicated... yeah idk why but i like to get in trouble lol. About the warnings right now i just got 28, so we are improving it a lil bit. Here we have them: ![]() I´ll do a check to make damn sure everything is ok using your tips. Thanks very much for answering again mate, really appreciated! RE: Warnings while compiling 56c and default combat messages - Coruja - 06-14-2016 03:30 AM yea you got a nice idea, doesn't make sense hit someone on the chest and get "you destroyed <name> platemail legs". You can get/set the layer hit using LOCAL.ItemDamageLayer / LOCAL.ItemDamageChance on @GetHit trigger, but this is only used for item damaging, there's no others messages/bonuses/etc. So you just need to get this layer and show the proper message based on this number PS: these compiler messages are not really errors, just some VS compiler warnings pointing some code lines that can be "improved". Of course it would be better without these warnings, but they doesn't cause any problem at all. Anyway, using latest 56d nightly I doesn't get any of these warnings so I presume that all of them are already "fixed" ![]() PS²: if you're already using the last 56c code, it's a nice idea update it to 56d nightlies. It's the same code but with more improvements and bugfixes. Everything you need to do is update your SphereSvr.exe, sphere.ini, sphere_speech.scp and sphere_msgs.scp RE: Warnings while compiling 56c and default combat messages - Mad Gunther - 06-18-2016 07:38 AM Hello Coruja, Thanks for the info. I´ve been trying what you said and itemdamagelayer works pretty good. I can get the layers easily but i have noticed that info on sphere_defs doesn´t fit too much with the info that i get ingame. For example ingame i get 3 layers that are not listed in sphere_defs, they are: layer_neck=0x0a layer_waist=0x0c layer_innertorso=0x0d Other strange seen i have checked out is that the higher layer i get is 18. if we look through source or sphere_defs layers are organized like this: Code: layer_hand1 1 Doesn´t make sense really... i had the idea to check the runuo core source, and voila! Layer List Code: Invalid = 0x00, These ones contrast well with what i get ingame, and i suppose i don´t get some of them because i´m using a 2.x.x version client (like bracelet for example). By this i mean the info available is not accurate right? because if not i don´t know whats really going on here lol. i´m planning to set layers manually when @gethit is called, so i´m planning to use the last ones and add the messages with them. About the 56d, it sounds good. If it is less buggy and perfomance is better then let´s give it a try. I just changed a couple minor things in source that are hardcoded like parrying or adding styles to the attacks, so yea looks like the better option. RE: Warnings while compiling 56c and default combat messages - Coruja - 06-23-2016 04:01 PM layers are working fine, like on your example "layer_neck=0x0a" where this is the same of "layer_collar=10" (hex 0a = dec 10, neck = collar) the layer name doesn't really matter because every emulator name it as desired, the most important value is the layer number, which is internally used by the client so it's the same on all emulators also remember that not all layers can be damaged on @GetHit. By default sphere only cause damage on these layers (you can get or change this value using LOCAL.ItemDamageLayer): Code: LAYER_SHOES 3 PS: weapons/shields are not included on this list because they are damaged in another way. When you hit someone using weapons there's a chance to damage the weapon on @Hit, and also there's another chance to damage the weapon/shield on @GetHit when you successfully parry an attack RE: Warnings while compiling 56c and default combat messages - Mad Gunther - 06-25-2016 08:46 AM lol i thought layers were being read in decimal instead of hex... I have tried to convert the numbers to hex and it works properly. Thanks for all the info, it was very helpful mate. Greetings. |