soundmud / soundrts

A real-time strategy audio game
http://jlpo.free.fr/soundrts
Other
44 stars 32 forks source link

Bonus sight range upgrade #17

Closed craigbrett17 closed 10 years ago

craigbrett17 commented 10 years ago

I've got a rough idea of how effects as bonuses and such like work in SoundRTS when making your own mod. So I thought something like this would work.

def radar class upgrade cost 500 time_cost 60 effect bonus sight_range 2

With an air command center able to use this upgrade, I'd expect that when radar was researched, the air command center's sight range would increase by 2 squares. Unless I'm doing it wrong, it doesn't.

My guess is that this hasn't been implemented yet as a bonusable field (not quite sure how it works and haven't looked into the code enough to work it out). Would this be feasible?

soundmud commented 10 years ago

At the moment, sight_range must have a value of 0 or 1. With a value of 1, the unit can see adjacent squares. So if the bonus worked it would work for a unit with a basic sight_range of 0, and a bonus of 1.

Of course it could be implemented, even if maybe it would be better to wait for the introduction of sub squares, because the way sight range works might evolve a bit. Not sure yet. The basic unit of sight range might be a third of a square. I'm really not sure.

craigbrett17 commented 10 years ago

Hmmm, confusingly, this looks like it should already work from reading the code. Argh. Maybe a bug then? Possibly user error. Here. I can post what I've got if it would help.

craigbrett17 commented 10 years ago

Ah, ok! You beat me to the post. In that case, this probably isn't relevant until you guys decide what's going to happen with that. Thanks for your response.