MishFTW Posted June 16, 2012 Report Share Posted June 16, 2012 a nuclear bomb went off somewhere in the map.That should so be a cheat. I don't endorse nuclear warfare 99% of the time but something like that in the completed game would be epic Not to mention many ancient texts speaking of such weapons (if you believe in/know of the ancient astronomer theory, you know what I mean) Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted June 16, 2012 Author Report Share Posted June 16, 2012 We need a version of the "torpedo#" cheat from AoK, so you can instantly wipe out an enemy player Quote Link to comment Share on other sites More sharing options...
Yves Posted June 17, 2012 Report Share Posted June 17, 2012 I think i was wrong, I shouldn't be too complicated.I've played a few games in the last days and it feels like after a certain point in time you're constantly in a huge battle.The main thing I was doing was setting rally-points somewhere near the front and keeping the stream of units rolling while keeping a balance between siege weapons, melee soldiers and ranged soldiers.It would have felt wrong if peace-music started playing at any time during the last ~20 minutes.This scenario could be easily covered with a kills/time ratio.However it could be different for campaign missions and for new players who aren't that aggressive .Probably it would still be sufficient to cover most of the situations by having a short-time kill-ratio and another longtime kill ratio.Let's say 6 kills in 10 seconds are the short-time trigger for small battles in the early game. the battle sound could continue playing for another ~30 seconds when the condition isn't met anymore.For the lategame we could have another long-term trigger. Let's say 50 kills in 5 minutes.It would be calculated regularly and if it goes below that threshold, it would switch to peace-music again.The idea is that it doesn't switch back to peace-music too quickly in the late-game. Quote Link to comment Share on other sites More sharing options...
majapahit Posted June 28, 2012 Report Share Posted June 28, 2012 We need a version of the "torpedo#" cheat from AoK, so you can instantly wipe out an enemy player I prefer the photon man, it's more suitable for ancient astronaut theory Quote Link to comment Share on other sites More sharing options...
Pedro Falcão Posted October 15, 2012 Report Share Posted October 15, 2012 Are there differences between a battle and a raid? I think 10 cavalry archers firing on women isn't a battle, meanwhile a hero + 4 soldiers against a hero + 4 soldiers is a battle. Maybe you guys should make battles take into account if the units involved are economic or military, their ranks, if the soldiers are charging against each other and the percentage of military units present on the conflict to be considered a battle. Quote Link to comment Share on other sites More sharing options...
J-Dx Posted October 29, 2012 Report Share Posted October 29, 2012 How feasible would it be to fade the battle music as you scroll away from the fighting as peace music fades in. Could work vice versa when you scroll towards a battle. If that hasn't been suggested before! Quote Link to comment Share on other sites More sharing options...
feneur Posted October 29, 2012 Report Share Posted October 29, 2012 How feasible would it be to fade the battle music as you scroll away from the fighting as peace music fades in. Could work vice versa when you scroll towards a battle. If that hasn't been suggested before!I'm personally against that, partly because it adds complexity to the implementation, but mostly because it would kind of ruin part of the purpose of battle music: to make sure you're aware that a battle is going on. On the other hand it would add to the other purpose: making battles "feel" differently from the rest of the game. But still, most of the time you're in the middle of a battle you'll want to either focus on the battle, or just quickly switching back and forth between economic duties elsewhere/bringing new troops to the fight, so I really don't think having the music fading back and forth would add very much. 1 Quote Link to comment Share on other sites More sharing options...
J-Dx Posted October 29, 2012 Report Share Posted October 29, 2012 I'm personally against that, partly because it adds complexity to the implementation, but mostly because it would kind of ruin part of the purpose of battle music: to make sure you're aware that a battle is going on. On the other hand it would add to the other purpose: making battles "feel" differently from the rest of the game. But still, most of the time you're in the middle of a battle you'll want to either focus on the battle, or just quickly switching back and forth between economic duties elsewhere/bringing new troops to the fight, so I really don't think having the music fading back and forth would add very much.Good points. I guess what I was thinking of would be rather complex (such as the battle music playing to alert you then when you go to the battle and scroll away it fades sort of thing). Maybe it could just get quieter but not stop to add a bit of a 'feel' to it?Depending on how dramatic the music is personally I would only want it for large battles such as 50+ troops. Smaller fights could have slightly less dramatic music. Quote Link to comment Share on other sites More sharing options...
feneur Posted October 29, 2012 Report Share Posted October 29, 2012 Good points. I guess what I was thinking of would be rather complex (such as the battle music playing to alert you then when you go to the battle and scroll away it fades sort of thing). Maybe it could just get quieter but not stop to add a bit of a 'feel' to it?Depending on how dramatic the music is personally I would only want it for large battles such as 50+ troops. Smaller fights could have slightly less dramatic music.I think we'll have a "Your units are being attacked" alarm sound when units are attacked, and only have battle music play during actual battles. Exactly how to define a battle is the main issue though (and the reason for this thread ). Quote Link to comment Share on other sites More sharing options...
zoot Posted November 18, 2012 Report Share Posted November 18, 2012 I'm considering doing some work on this. Would it be a good idea to do it as a separate component (BattleDetection.js or whatever) or should it go into an existing one? Quote Link to comment Share on other sites More sharing options...
quantumstate Posted November 18, 2012 Report Share Posted November 18, 2012 I think a separate one would be best for this. It is easy to interface with the existing components so you can still share code. Quote Link to comment Share on other sites More sharing options...
zoot Posted November 18, 2012 Report Share Posted November 18, 2012 (edited) I think a separate one would be best for this. It is easy to interface with the existing components so you can still share code.Alright.Here is the 'skeleton' of the state machine I intend to use: https://github.com/z...ffae749d150c6d2How do I get it wired up so exactly one entity with this component is created when the game session begins?Also, what is the preferred way for it to interact with the sound manager to trigger playback of peace/war music and notification sounds? Edited November 18, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
quantumstate Posted November 18, 2012 Report Share Posted November 18, 2012 For a single component you need to attach it to the system entity which unfortunately requires a C++ change. The location is:source/simulation2/Simulation2.cpp:128Apart from that you can just copy what one of the other system components does, there are files in public/simulation and public/simulation/interfaces.Your basic design seems ok, but I was wondering if using a full FSM is overkill given that there are only two states. Maybe it would be simpler to not use the FSM?I'm not sure about the sound manager since I have never used it. Quote Link to comment Share on other sites More sharing options...
zoot Posted November 18, 2012 Report Share Posted November 18, 2012 Your basic design seems ok, but I was wondering if using a full FSM is overkill given that there are only two states. Maybe it would be simpler to not use the FSM?Yeah, possibly. I'll try and see how far I can get with a non-FSM design. Quote Link to comment Share on other sites More sharing options...
stwf Posted November 19, 2012 Report Share Posted November 19, 2012 To me it seems like I'd only really want to hear the battle music when I was starting a large attack I had prepared and moved into place. While I want to be notified of any violence happening to my units, I do't consider it a battle when an enemy band happens upon an army gathering spot.So maybe it could be based on the user input, like change to battle music when 10 or more units are commanded by the user to attack inside enemy territory (or your opponent launched such an attack inside your territory). Since its just a bonus nicety anyway I hate to see a lot of time being spent agonizing over when certain songs should be played.Technically you are in a battle as soon as you appear on the map! Quote Link to comment Share on other sites More sharing options...
zoot Posted November 19, 2012 Report Share Posted November 19, 2012 I don't think a lot of agonizing will be needed, we have some good ideas in this thread for how battle vs. peace should be defined.stwf, how do you recommend the BattleDetection component should trigger the sound manager to play a different track? Is there a particular function to use?Also, which function should be used for playing attack notifications? Quote Link to comment Share on other sites More sharing options...
Spahbod Posted November 19, 2012 Report Share Posted November 19, 2012 Maybe it should trigger by the number of "fighting" units. For e.g. if 10 or more of my units are fighting something. I expect to hear the battle music if I am attacked, if all of my army attacking the enemy base or if there is an attrition battle going on on the map. Quote Link to comment Share on other sites More sharing options...
zoot Posted November 28, 2012 Report Share Posted November 28, 2012 (edited) For a single component you need to attach it to the system entity which unfortunately requires a C++ change. The location is:source/simulation2/Simulation2.cpp:128Apart from that you can just copy what one of the other system components does, there are files in public/simulation and public/simulation/interfaces.What am I missing:https://github.com/zootzoot/0ad/compare/master...51dad1dWhen I run it, I get this error and a crash:ERROR: CXeromyces: Parse error: in_memory_buffer:1: Element interleave is emptyERROR: RelaxNGValidator: Failed to compile schema Edited November 28, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
quantumstate Posted November 28, 2012 Report Share Posted November 28, 2012 Your schema has no elements in it.You need at leas an <empty/> element. Also looking at another system component there seems to be another tag. Try adding these elements:BattleDetection.prototype.Schema = "<a:component type='system'/><empty/>";Also, will this component handle attack notifications? Quote Link to comment Share on other sites More sharing options...
zoot Posted November 28, 2012 Report Share Posted November 28, 2012 (edited) You need at leas an <empty/> element. Also looking at another system component there seems to be another tag. Try adding these elements:Thanks, I'll try that. (Edit: It worked )Also, will this component handle attack notifications?Yes, that was my intention. Edited November 28, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
zoot Posted November 29, 2012 Report Share Posted November 29, 2012 I don't get the error now, and the component script seems to load, but it never enters the Init() function.https://github.com/zootzoot/0ad/compare/master...8873cd6 Quote Link to comment Share on other sites More sharing options...
quantumstate Posted November 29, 2012 Report Share Posted November 29, 2012 That is odd. How are you testing whether it enters the Init() function? Also just to check the obvious, you have recompiled?Just for reference I previously made a rough prototype of an attack notification system http://pastebin.com/Tq2nDYK8 . I made this a player component but a system component like you are doing might be better. Quote Link to comment Share on other sites More sharing options...
zoot Posted November 29, 2012 Report Share Posted November 29, 2012 That is odd. How are you testing whether it enters the Init() function? Also just to check the obvious, you have recompiled?Ah, lol, that is it. I'm too accustomed to making JavaScript-only changes. Just for reference I previously made a rough prototype of an attack notification system http://pastebin.com/Tq2nDYK8 . I made this a player component but a system component like you are doing might be better.Thanks, I'll try and integrate that code. What is the functional difference between a player component and a system component? Do they both require a C++ change? Quote Link to comment Share on other sites More sharing options...
quantumstate Posted December 1, 2012 Report Share Posted December 1, 2012 I just posted that code to give one idea for how to implement it, don't feel like to need to use it, only if it is helpful.Only system components need the C++ change.All components are part of entities. Most entities are things like trees, units etc. There are some special entities though, these include players, formation controllers and the system entity.The components that an entity has are defined using the templates. So if there is <Identity>...</Identity> in the template than that entity will have an Identity component. You will find the templates for the unusual entities like players and formations in the templates/special directory. The single exception to this rule is the system entity which has the components defined with the C++ instead, there is only one system entity (there may be other differences, I don't know the fine details of the component system that well).So if you create a player component there will be an instance of it for each player in the game. Whereas a system component will only have one instance because there is only one system entity. Quote Link to comment Share on other sites More sharing options...
zoot Posted December 2, 2012 Report Share Posted December 2, 2012 (edited) I would like to implement this:For battle detection I think it would be good to use damage rate as a metric to determine when a battle is taking place. So if lots of units are being damaged then it is a major battle. The idea of taking the total army size into account sounds good as well.What would be a good way to determine damage rate? I figured I might use the OnGlobalHealthChanged() event, but it contains no information about the affected entity. Should I slap a new argument on OnGlobalHealthChanged, or is there a better way?Edit: Actually, OnGlobalHealthChanged passes a 'msg' object, so adding another property is not a big deal. I'll just do this unless there's any other suggestions.Edit2: There is no information about who dealt the damage in the Health component, so maybe I have to do something else. Edited December 2, 2012 by zoot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.