aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - skymarshall

Pages: [1] 2
1
Programming / Re: Explosion Graphics
« on: September 11, 2014, 08:55:13 am »
I did start by doing that, but that approach commits you to using 128x64 images (or at least uniform images, I think).   If SurfaceSet will actually cope perfectly well with different size images, or could easily be made to, then expanding x1.pck is the way to go.  It's nice to use the x/y sprite dimension in SurfaceSet to determine the offset to display the sprite rather than use hardcoded 64/32.  These are extremely useful features if you have spritesheets handy already, as converting e.g. 85x85 sheets to 128x64 is a soul destroying activity.   

Unlike unit images and tiles, where uniformity is king for obvious reasons, it's OK I think to allow variation in size for explosion images.

Having control over anim speed and sprite density is also desirable if using nonstandard sprites, as you end up with very lame looking slow or sparse explosions unless the sprite is very similar to the original.  Once I'd added that, I thought there was enough to justify moving explosion config out to a separate yaml entry, so that multiple items could share the same config without replicating it.

If you do want to keep explosions on the item config, it also would be nice to have a way of changing the default explosion(s) without needing update every item entry or being tied to sprites 0-7.

Anyway, these are just my ideas, not even arguments or strong opinions, so please feel free to ignore or use as you wish



2
Programming / Re: Scripted event missions
« on: September 11, 2014, 01:01:34 am »
Your "greedy" branch is a good plan for now as there are a lot of dev ideas that could use refining and exploring by the modding community here before they go anywhere near the master code

I actually started coding this events change locally on top of your 4-weapon craft change (not a proper checkout sadly as I was too impatient to learn github at that point) and then once I had it working, merged some of my changes into the latest nightly to create the clean branch I shared here.  So we're clearly thinking along the same lines

Not clear what we'd do with said branch once the tftd code is ready or after any major refactoring of the master, but c'est la vie


3
Programming / Re: Scripted event missions
« on: September 10, 2014, 11:24:34 pm »
Any ideas on what I could do to this change to make it approvable?

I'm not submitting these changes yet, as I think they're still too out there.

To Noel's question, the missions that become available to the player using this feature are completely separate beasts from the alien missions.  The point at which they start sharing information is the UFO config and the aliendeployment config.  So, there's no way to trigger a modified alien terror mission sequence from my scripted events. 

Even if you could, there is way too much hardcoded to STR_TERROR_MISSION, so if you created a duplicate STR_TERROR_MISSION2 alien mission in the ruleset, it would not behave anything like an alien terror mission.

4
Programming / Re: Explosion Graphics
« on: September 10, 2014, 10:18:38 pm »
Good points - I spotted the blast radius issue too but hadn't attacked it yet.  It would be easy enough to bolt this in to ExplosionBState. 

The sound config needs a bit of thought on a sensible way to configure it first, as the current code uses two sounds, one for power <= 80 and one for the rest.  I didn't want to hack in a solution (e.g. have the default stick to this behavior, have new explosions use a configured sound), similarly did not want to overengineer (e.g. have a vector of powers and sound effects for each explosion).  So, thought I would stay away for now and try to get what I've done into an approvable state.

BTW Kudos for all your new graphics in your XenoOps mod - I will download that and check it out properly soon but just from the screens I can see that there's probably weeks of your time spent on it.  Really like the look of your new UFOpaedia screens

5
Programming / Re: [Deadly bug] The game cracks during tactical fight
« on: September 10, 2014, 02:23:41 am »
If you hit bugs in the battlescape and want to get back to the geoscape, set the debug flag in your config file (My Documents\OpenXcom\options.cfg on windows) and then whenever you hit a problem, you can press ^D (to enable debug) and ^K (to kill the aliens).  No need to edit save files each time.

6
Programming / Explosion Graphics
« on: September 10, 2014, 01:51:18 am »
I have a proposal (and code branch :) ) for improving the way that area explosion sprites are handled.

At the moment, we're limited to using the explosion graphics in X1.PCK for every area explosion - I think it would be quite cool to allow different explosion graphics for different weapons in the game.

There's also a couple of minor bugs that I've spotted in the way that explosion sprites are drawn, notably that:

 - large explosions tend to look diamond shaped on screen rather than circular, since the sprites are randomly drawn within a square on the battlefield
 - explosion graphics are displayed slightly too high on screen from the centre of the explosion

I have made a code branch that externalizes the explosion graphics config into entries like this:


explosions:
  - type: STR_DEFAULT
    spriteSheet: "X1.PCK"
    start: 0
    end: 8
    animSpeed: 100
    density: 100


I've then created a custom ruleset that has new entries like this:


  - type: STR_DEFAULT
    spriteSheet: NEW_EXPLOSIONS
    start: 0
    end: 35
    animSpeed: 50
    density: 100
  - type: STR_PLASMA
    spriteSheet: NEW_EXPLOSIONS
    start: 36
    end: 72
    animSpeed: 25
    density: 300   
  - type: STR_STUN
    spriteSheet: NEW_EXPLOSIONS
    start: 72
    end: 108
    animSpeed: 25
    density: 300


Then, I've ripped and converted some explosion graphics from other sources so that I can play a game in which rockets, plasma grenades and stun bombs have different explosions as shown:





All look much nicer animated, and the settings are all contained in a new mod ruleset file.

Feedback please, I would like to submit this one.

My branch is here: https://github.com/skymarshall/OpenXcom/tree/new-explosions/src


7
Really like all your new sprites!  They're really professionally done

Microprose should have employed you back in the 90s :)

8
Programming / Re: Scripted event missions
« on: September 05, 2014, 01:37:18 pm »
What I've implemented so far would allow you to do a one-time multi stage mission that shows up on the geoscape.  I haven't implemented triggering the events on a timer, allowing the event to reoccur, or timing the event out (synomium sites need all of those).   None of those are exactly rocket science and I could fit them in over what I've done without rewriting anything.

I have no idea how those synomium and cruise ship missions triggered in tftd though - were they part of a normal alien terror mission involving a chain subs or did they "just appear" ?  Certainly my experience was the latter. 

The terrain stuff is interesting - if you check out the rules file in my build I've also externalised some of the terrain feature control into alien deployment (ie whether to show the craft, and 'guaranteed' terrain blocks like the alien brain, base control, exit lifts).  In principle, you could do silly things from config like have a 5 stage alien base (this would need new terrain blocks for a lift to the next level)

No idea whether or not the terrain features code I put in is sufficient for the xcom2000 maps as I'm not familiar with them yet.   I'm putting the guaranteed blocks anywhere on the map, so I couldn't do stuff  like coastlines yet, where block position matters.  But, I will take a look at the xcom2000 maps and see if they'd fit


9
Programming / Re: Scripted event missions
« on: September 05, 2014, 01:12:40 am »
Yeah, "script" here was meant in the sense of the script of a story (ie. missions are scripted out rather than procedurally generated).  I'm certainly not about to implement a scripting language for events!

<sigh> whatever, your reaction has pretty much convinced me that I need to think up a different name for this feature :/

10
Programming / Re: Scripted event missions
« on: September 05, 2014, 12:19:06 am »
@falko - thanks for that, I will check it out!  I was asking about the YAML schema as I have some ideas for changes and wondered about how best to put them forward.  I suspect anyone reading will find example YAML easier to follow than a JSON schema, so I will stick to that for now. 

I've created a github fork from the current code (4/9/14) and Scripted Events branch for myself here: https://github.com/skymarshall/OpenXcom/tree/Scripted-Event-Framework

This has the first draft of the scripted event framework I described in the first post, so anyone is welcome to download it and take a look. 


The main part of what I've done is to externalize the Cydonia mission.  Cydonia is now expressed in the rules as follows:


scriptedEvents:
  - type: STR_MARS_CYDONIA_EVENT
    scriptedEventType: 1
    engagementRestrictions:
      research: STR_CYDONIA_OR_BUST
      craft:
      - STR_AVENGER
    destinationEvent:
      buttonText: STR_CYDONIA
    winOnSuccess: true
    loseOnFail: true   
    confirmScreen:
      background: "BACK12.SCR"
      mainText: STR_ARE_YOU_SURE_CYDONIA
      palette: 5       
missionSequences:
  - type: STR_MARS_CYDONIA_EVENT
    missionSequence:
    - deployment: STR_MARS_CYDONIA_LANDING
      race: STR_SECTOID
      briefingScreen:
          background: "BACK01.SCR"
          music: "GMNEWMAR"
          title: STR_MARS_CYDONIA_LANDING
          mainText: STR_MARS_CYDONIA_LANDING_BRIEFING 
          palette: 6     
    - deployment: STR_MARS_THE_FINAL_ASSAULT   
      race: STR_MIXED
      briefingScreen:
          background: "BACK01.SCR"
          music: "GMNEWMAR"
          title: STR_MARS_THE_FINAL_ASSAULT
          mainText: STR_MARS_THE_FINAL_ASSAULT_BRIEFING
          palette: 7                                               


The data on what aliens are present is still held in AlienDeployments.

I've removed hardcoding around the mars and alien base terrains so that they can be used by new mission types.  This means that in my build, you should be able to set up any number of cydonia type missions, with full (well, some) control over the screens shown to the user and with the ability to hand out specific rewards (e.g. technology, items).


I've also created one-off events that show up on the geoscape as either static locations or UFOs.  There's another rule file (example_events.rul) where I've created 2 example events to demonstrate the framework. Here is a sample event:


  - type: STR_SUPER_UFO
    scriptedEventType: 3
    engagementRestrictions:
      facility: STR_LARGE_RADAR_SYSTEM
    ufoEvent:
      name: STR_SUPER_UFO
      ufoType: STR_SUPPLY_SHIP
      locations:
        - lon: 65
          lat: -59
        - lon: 111
          lat: -42
        - lon: 89
          lat: -67                   
    winOnSuccess: false
    loseOnDefeat: false   
    detectedScreen:
      background: "BACK04.SCR"
      music: "GMMARS"
      title: STR_SUPER_UFO
      mainText: STR_SUPER_UFO_MAIN
      palette: 3
    failedToEngageScreen:
      background: "BACK03.SCR"
      music: "GMMARS"
      title: STR_SUPER_UFO_NOENGAGE
      mainText: STR_SUPER_UFO_NOENGAGE_MAIN
      palette: 3 
    successDebriefingScreen:
      background: "BACK01.SCR"
      music: "GMMARS"
      title: STR_SUPER_UFO_SUCCESS
      mainText: STR_SUPER_UFO_SUCCESS_MAIN       
      palette: 0
    failureDebriefingScreen:
      background: "BACK01.SCR"
      music: "GMMARS" 
      title: STR_SUPER_UFO_FAIL
      palette: 0     
    successScoreText: STR_SUPER_UFO_SUCCESS
    successScore: 1000 
    rewardItems:
      STR_ALIEN_ALLOYS: 1000
      STR_ELERIUM_115: 250
      STR_PLASMA_RIFLE: 100               
missionSequences:       
  - type: STR_SUPER_UFO
    missionSequence:
    - deployment: STR_SUPER_UFO
      race: STR_ETHEREAL
      briefingScreen:
          background: "BACK01.SCR"
          music: "GMNEWMAR"
          title: STR_SUPER_UFO
          mainText: STR_SUPER_UFO_BRIEFING
          palette: 6


This example mission spawns a unique UFO (a supply ship) that can only be engaged once a large radar has been built.  It uses a unique AlienDeployment that puts the player against an unreasonable quantity of sectopods, and once beaten, gives a huge stack of equipment. 



Any feedback or ideas welcome!  Having done this as a proof of concept, it would be great if I could polish (or more likely, strip down) some of this into a form suitable for inclusion!

11
Programming / Re: Depixelating
« on: August 25, 2014, 12:24:56 pm »
That hq4x algorithm does look amazing on the cartoony sprites.  Theres a filter included in OpenXcom (scale4xhq) that I assume is doing the same thing? 

Agree that running a filter on the final screen is BS, and it's much better to use the algos to produce higher quality alternative sprites upfront.  I hate the way that pixellated fonts look, for example, after a filter.


12
Programming / Re: Ufopaedia screens for Armor and Vehicles
« on: August 24, 2014, 12:53:29 pm »

@smexvamy - It needs a code change - admittedly a tiny one - and that sadly means it can't be done as a mod plugin :(

@VM - those models look really nice!  If you're not planning on doing further work on them yourself, please think about posting the files up somewhere so that someone else can continue your efforts. 




13
Programming / Re: Scripted event missions
« on: August 22, 2014, 10:54:35 pm »
Good idea, but premature for now.  Right now, I'm just playing around and learning - if I do get to a point where I'd be confident contributing to the TFTD dev, I'll offer my services

14
Programming / Re: Ufopaedia screens for Armor and Vehicles
« on: August 22, 2014, 10:39:35 pm »
Sadly, all this is a matter of taste rather than my ideas being a strict improvement - so replicating the original game has to win out for the moment

I like my changes, but unless I hear loud noises from the community to submit them properly, I think they just stay on my local build

15
Programming / Re: Scripted event missions
« on: August 22, 2014, 10:15:12 pm »
Haha, I've already started implementing it.  If/When I have something loosely working I'll post up some details of what I've done for feedback

At the very least, I'm planning to:

 - externalize configuration for the Cydonia mission (.. and in doing so allow multiple such missions with different setups)
 - externalize configuration for terrain building on alien bases, cydonia and terror sites so that other missions can use those terrains without issue (right now there's too much hardcoded to the mission type)

Once I've done that, I'll start looking at the more ambitious step of having scripted events start putting special UFOs and bases on the map.

EDIT:

Does anyone know if there is a schema document for the OpenXCom YAML rules files?  Similarly, is any part of the Xcom code for encoding/decoding the YAML files autogenerated, or can I safely go hacking around in there to make changes?

Pages: [1] 2