New Powered Unit Logic

Bug #1042496 reported by Gluk-v48
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ares
Confirmed
Undecided
Unassigned

Bug Description

Hi everyone, the problem is this:
If you use [UnitType] ► PoweredBy=, then the EVA will not play sounds RobotTankOnline and RobotTankOffline
It is not necessary to bind the logic PoweredBy= ActivateSound= and DeactivateSound=, since I do not want to hear the same ad >1 times.
I think that should be added to this logic, two new options:
[AudioVisual]►Powered.ActivateSound =
[AudioVisual]►Powered.DeactivateSound=

Gluk-v48 (glukv48)
description: updated
Gluk-v48 (glukv48)
description: updated
Gluk-v48 (glukv48)
description: updated
description: updated
Revision history for this message
mevitar (mevitar) wrote :

You mean you don't want to hear the sound for every unit that deactivates/activates? You can just set the Limit= tag in soundmd.ini to 1 for that, no need to add any additional logic.

Revision history for this message
Gluk-v48 (glukv48) wrote :

Mevitar, I am leading that what sounds enable\ disable do not play at all, and when it will be fixed, I do not want to hear the sounds many times

Revision history for this message
mevitar (mevitar) wrote :

Huh?
How come i can hear them in my mod?

It definitely works, even for multiple different units at once. Do you still have RobotTankOnline and RobotTankOffline on the sound list in soundmd.ini?

Still, add Limit=1 to RobotTankOnline and RobotTankOffline sounds in soundmd.ini, then you won't be hearing those multiple times, just once every time the powering building goes offline/online. YR handles it already, so i think there is no need for any additional coding for that. Especially that unit-powering logic handles those sounds per-unit, not globally, and i don't know how hard would be to de-globalize this.

Revision history for this message
Gluk-v48 (glukv48) wrote :

Mevitarit, only works for the old logic PowersUnit=

Revision history for this message
mevitar (mevitar) wrote :

I'm using it for 6 or more units with PoweredBy= and it works fine for all of them. I have ground units, hover units, and even jumpjet units, neither had any problem with it.

Which Ares version are you using?

And did you get rid of PowersUnit= on the building, and PoweredUnit=yes on the units? Those should not be there if you are using PoweredBy= logic.

Revision history for this message
Gluk-v48 (glukv48) wrote :

Version Ares 0.2RC1, the same problem I've seen in previous versions.
Tags from the old logic has been removed.

Revision history for this message
mevitar (mevitar) wrote :

I don't know what's the problem, then. I'm using 12.204.753, and it works fine here (same with older versions, including 0.2 RC1).
Even separate ActivateSound and DeactivateSound for each unit work without any problems.

Post your unit and powering building code here, maybe those will give us a clue why it happens. It doesn't seem to be the fault of Ares, though.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Same thing... I couldn't confirm.

ActivateSound and DeactivateSound as VehicleType entries works for both old PoweredBy and new PowersUnit logics.

Also even if they wouldn't work, having it as a general tag would be bad if there would be more controller buildings and the modder would differ them.

Revision history for this message
Gluk-v48 (glukv48) wrote :

Now I re-checked it. I took the original rulesmd.ini, and sounds RobotTankOnline and RobotTankOffline reproduced normally. After I removed the line in rulesmd.ini PowersUnit=ROBO, and a string PoweredUnit=yes replaced the PoweredBy=GAROBO, then EVA not play sounds RobotTankOnline and RobotTankOffline.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Post up a rulesmd... I am trying to reproduce it with no avail.

Revision history for this message
mevitar (mevitar) wrote :

Perhaps there is something wrong with the .inj file you have? Try updating all Ares files to the 12.204.753 version, and check if it works with it.

Revision history for this message
Gluk-v48 (glukv48) wrote :

No, what has changed (

Revision history for this message
mevitar (mevitar) wrote :

Last thing, then... Did you use NPatch, and did you uninstall it before using Ares?

Revision history for this message
Gluk-v48 (glukv48) wrote :

Of course

AlexB (alexander-b)
Changed in ares:
status: New → Triaged
Revision history for this message
Gluk-v48 (gluk-v48) wrote :

Sorry for the confusion, but I had not introduced ActivateSound = and DeactivateSound =.
I had, I will give notice EVA EVA_RobotTanksOffline and EVA_RobotTanksBackOnline.

Revision history for this message
Graion Dilach (graiondilach) wrote :

Let me try to understand you... the bug was caused by your evamd which missed the entries?

Revision history for this message
Gluk-v48 (gluk-v48) wrote :

EVA entries EVA_RobotTanksOffline and EVA_RobotTanksBackOnline from the file evamd.ini doesn't work with new Powered Unit Logic.

Gluk-v48 (gluk-v48)
Changed in ares:
assignee: nobody → Gluk-v48 (gluk-v48)
Gluk-v48 (gluk-v48)
Changed in ares:
status: Triaged → Fix Committed
Revision history for this message
Gluk-v48 (gluk-v48) wrote :

Enclose amended PoweredUnitClass.cpp

Established on the basis https://github.com/Ares-Developers/Ares/blob/master/src/Misc/PoweredUnitClass.cpp

Revision history for this message
AlexB (alexander-b) wrote :

Thank you for your work on this issue. I've taken a look at the file, and I found some issues that need some fixing before I can commit it to Ares:
* EVA_RobotTanksBackOnline and EVA_RobotTanksOffline would play for every unit on the map, not just once per type.
* EVA_RobotTanksBackOnline will be played continuously for every unit on the map that needs an operator.
* The EVA sounds are still not customizable.

The second one would be a simple fix by moving line 28 after 33. The third would be nice-to-have. The first one would require some more work, otherwise the EVA messages would be very annoying.

Revision history for this message
Gluk-v48 (gluk-v48) wrote :

"The second one would be a simple fix by moving line 28 after 33. The third would be nice-to-have."

So you can not do, in this case, you will hear the sounds EVA_RobotTanksBackOnline after canceling attacks RobotTanks of weapons from EMP.

Gluk-v48 (gluk-v48)
Changed in ares:
status: Fix Committed → In Progress
Revision history for this message
Gluk-v48 (gluk-v48) wrote :

The only problem I found it repetitive sounds EVA_RobotTanksOffline if you build units with PoweredBy = at the time of power failure.

I'm still working on it. I work slowly, as I have just recently started learning C + +, and this is my first language.

Gluk-v48 (gluk-v48)
Changed in ares:
assignee: Gluk-v48 (gluk-v48) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.