Jump to content

fcxSanya

WFG Retired
  • Content count

    1,015
  • Joined

  • Last visited

  • Days Won

    12

fcxSanya last won the day on September 14 2016

fcxSanya had the most liked content!

Community Reputation

392 Excellent

1 Follower

About fcxSanya

  • Rank
    Primus Pilus

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Male
  • Location
    Russia

Recent Profile Visitors

1,337 profile views
  1. Hyrule Conquest

    I don't think so, see this somewhat related discussion earlier in this topic:
  2. Hyrule Conquest

    I've made an example here: https://github.com/AlexanderOlkhovskiy/0ad-civ-choices-mod See this commit for the relevant changes only (since I modified unit / civ templates and session.js): https://github.com/AlexanderOlkhovskiy/0ad-civ-choices-mod/commit/2c83b69cf6c55b1535edae3b4ed29909efbb802c
  3. Hyrule Conquest

    Your memory is better than mine There are indeed some scripted dialogs on the map: https://github.com/0ADMods/map_A_Silent_Day_In_Gaul/blob/master/maps/scenarios/A_Silent_Day_In_Gaul.js#L343 But they seem to be based on the standard layout with configurable text and button captions.
  4. Hyrule Conquest

    With technologies + custom dialog approach I described in my previous messages, you need technologies (and also to edit unit templates they are unlocking) and a dialog in gui/session (see diplomacy, trade and objective dialogs as examples).
  5. Hyrule Conquest

    I believe triggers are simulation scripts and can't introduce custom gui. Also they are bound to specific maps. Am I wrong? That's why I said "with a custom UI to select one of them at the match start", i. e. the mod will have that custom dialog at the match start which will list (and allow to select one of) civ-specific technologies of a special type.
  6. Hyrule Conquest

    In my understanding A Silent Day In Gaul is a narrative scenario, so it's notable for player in-game actions (not just UI interaction) affecting the story progress. So I believe your second alternative is more relevant here: Why not? For me it looks exactly like 4 mutually exclusive technologies, each unlocking its own set of heroes / units with a custom UI to select one of them at the match start.
  7. Hyrule Conquest

    Hm, it looks ok. Are you sure you have multiple peace tracks in your civ json? You can try to put something like warn(uneval(this.tracks.PEACE)); before the startPlayList to check what tracks are in the list (not sure whether it would properly print the list of objects though).
  8. Hyrule Conquest

    In "case this.states.PEACE:"? Or you did replace the entire updateState body? Can you share your entire music.js?
  9. Hyrule Conquest

    The image from the browser console is just a test to check how concat/shuffleArray combination works, see the last 3 identical calls of [this.tracks.PEACE[0]].concat(shuffleArray(this.tracks.PEACE.slice(1))) which produce different results (with the first element always on the first position): [1, 5, 4, 3, 2] [1, 3, 4, 5, 2] [1, 2, 4, 3, 5] this is an emulation of tracks order What you need in your music.js is that one line (+comment): // Play the first track first and then the remaining ones in a random order this.startPlayList([this.tracks.PEACE[0]].concat(shuffleArray(this.tracks.PEACE.slice(1)))); where I forgot two other params of startPlayList btw, so it actually should be: // Play the first track first and then the remaining ones in a random order this.startPlayList([this.tracks.PEACE[0]].concat(shuffleArray(this.tracks.PEACE.slice(1))), 3.0, true); You need to put it in "case this.states.PEACE:" of updateState (where your two startPlayList's currently are)
  10. Hyrule Conquest

    I believe you should call startPlayList only once, otherwise it seems like you are starting to play one list (non-shuffled) and then immediately switching to another (shuffled). What I suggested to do in the that second item ("2. shuffle only second and subsequent tracks for the 'PEACE' state in 'updateState'") is something like this: // Play the first track first and then the remaining ones in a random order this.startPlayList([this.tracks.PEACE[0]].concat(shuffleArray(this.tracks.PEACE.slice(1)))); I didn't test it in the game, but "on paper" (in the browser console) it looks fine: (randIntInclusive and shuffleArray definitions are from random.js and utility.js respectively)
  11. We have a ticket for it: #1306 . I tried to glance at the related code the previous time it was brought up, but didn't find how to fix this quickly enough and didn't return to it afterwards. Player assignments are managed in gui scripts (in gamesetup.js in particular), while entities initialization is performed in MapReader.cpp (see CXMLReader::ReadEntities). Map loading is obviously ha ppening after the gamesetup, but I'm not sure whether the MapReader has access to the player assignments (it has some 'LoadPlayerSettings' which goes into simulation2, which may or may not have the relevant data). This is more complicated. Our previews are arbitrary images rather than minimap-like schemas. I guess we may implement an additional optional 'schema' (or 'placements') element for maps consisting of an image and metadata (player locations on the image), which preferrable should be autogenerated by Atlas. This schema then will be displayed in the gamesetup somewhere besides the regular preview.
  12. Counters must come back

    In AoK it can be countered by champions, siege and some unique units, see Trash Resistance
  13. Hyrule Conquest

    They are defined in pathfinder.xml and used in CCmpUnitMotion.cpp and CCmpPathfinder.cpp
  14. Hyrule Conquest

    This wasn't answered yet, right? (I don't see any follow-up discussions skimming over the subsequent posts) There are no videos, nor video support in 0 A.D. as far as I know, and I even don't remember (and can't find) any discussions or tickets related to it. I think the current (maybe somewhat vague) plan is to have in-game cinematic scenes for campaigns. On the other hand it's a somewhat basic and expected feature for a game engine. Also it's self-contained enough so shouldn't be hard to maintain. I've created a ticket (#4724 (Video playback)) and will try to do some basic research for it unless someone else would do it faster or will link to an existing implementation / discussion etc.
  15. Hyrule Conquest

    JSON is a data format, you can't write code (i.e. call 'concat' and 'shuffleArray') there. What civ json files do is they define civ-specific collections of tracks. These collections are used in music.js , which is a part of the music manager as far as I understand. music.js is apparently where you saw the main menu track-related logic and that's probably what you have to modify to achieve your goal. As you can see, in 'resetTracks' state-specific playlists are filled with default tracks, then civ-specific collections are added into the playlists in 'storeTracks' and finally 'updateState' starts playing the state-specific playlist. For the 'MENU' state playlist is played as is (unshaffled) and 'Honor_Bound.ogg' is always the first track in it (due to code in 'resetTracks'). For other states playlists are shuffled. So, unless I've missed something, you can: 1. remove the default peace tracks from 'resetTracks' 2. shuffle only second and subsequent tracks for the 'PEACE' state in 'updateState' what should result in the first peace track from civ json to always play first and other ones being shuffled.
×