Author | Message | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Question about range weapons
| is there a way I can have different range for different weapons like in my game folder I see where I can set the range weapons its on 5 tiles by default but I want some weapons to have range 2 an progress as you go
|
Re: Question about range weapons
| You using Eoserv? I have this from an old rev: In the Map::Attack function, find: if (wepdata.subtype == EIF::Ranged) { range = static_cast<int>(this->world->config["RangedDistance"]); } then add this under it: if(this->world->config["WeaponEffects"]) { for(int i = 1; i<= static_cast<int>(this->world->config["WeaponEffectAmount"]); i++) { int wep = static_cast<int>(this->world->config[util::to_string(i)+".WepEffID"]); if(wep == from->paperdoll[Character::Weapon]) { if(static_cast<int>(this->world->config[util::to_string(i)+".WepEffRange"]) > 0) { range = static_cast<int>(this->world->config[util::to_string(i)+".WepEffRange"]); break; } } } } I'm sure this can be shortened/made more efficient but it's an old code and worked for me
|
Re: Question about range weapons
| Nice example Callum! --- Just your friendly neighborhood Programmer-Man!
|
Re: Question about range weapons
| You could go the pub route in eodata.hpp in template <class EIF> struct EIF_Data_Base under short armor; add unsigned char unkb; a little lower find armor(0), add unkb(0), in eodata.cpp in void EIF::Read(const std::string& filename) under newdata.armor = PacketProcessor::Number(buf[17], buf[18]); add newdata.unkb = PacketProcessor::Number(buf[19]); in map.cpp in void Map::Attack(Character *from, Direction direction) replace if (wepdata.subtype == EIF::Ranged) with if (wepdata.subtype == EIF::Ranged) Then in your eif file set the unkb value to the distance you want that ranged wep to be!
|
Re: Question about range weapons
| darn theres so much to this game I have no clue about lol thanks though. But honestly I don't know where to even start to do that. an I'm using eosouce
|
Re: Question about range weapons
| Plako posted: (22nd Mar 2017, 01:56 pm) Honestly...switch to Eoserv it's, still being developed, Sasauge an the others are still around to help etc. Eosource is kinda hacky, not even supported by the developers you'll have a better time with eoserv just my two cents bud good luck :) |