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.


Topics - skymarshall

Pages: [1]
1
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


2
Programming / Scripted event missions
« on: August 19, 2014, 09:40:34 pm »
One change that I'd like to make for my own modding benefit is the ability to have scripted event missions similar to cydonia that the player could choose to attack when ready, or similar to the TFTD cruise ships and synomium missions that pop up on a timer rather than being tied to the procedural alien missions.

I'd also want to be able to define specific rewards for scripted missions (for example, unlock parts of the tech tree, unlock new alien ufos/races, or handout specific items)

A framework like this would allow a modder to structure access to some of the tech in the game until the player has completed set objectives.  Whether or not you also tie in the aliens progression too would be a matter of preference.  I would only consider myself to have coded it properly if cydonia (and tftd terror sites) could be tied into the config entirely rather than being hardcoded.

One possible use of this might be (eg) add a ton of extra tech and races to the game that become available after cydonia, and a new set of endgame missions to complete after that dependent on the new content (eg unlock TFTD races and the Tleth mission).  Or, one could add a series of missions that you need to complete to advance up the normal tech tree similar to xcom2012.  Or, you could script in a 2 part bastard to serve up to the player on the first of every month just like TFTD :)

Off the top of my head, I was thinking of expanding the ruleset on my local build to script missions that appear on one of the following triggers:

- A timer, one off or recurring
- Once a particular technology has been researched
- Once a particular manufacturing project has been finished
- Once a particular base facility has been built
- Once another scripted mission is finished

The scripted mission itself might look like:

- A special UFO on the geoscape, following set trajectory
- A special alien base or terror site on the geoscape, at set or random location/city
- A new button on the select destination screen (like cydonia)

The first one would need care not to let the player break the game (eg shoot down a critical UFO over water, or fusion ball it to pieces).  Ditto a plot critical terror site would not expire, or would be an auto game loss if expired.

Once accepted, the scripted mission would need config for the terrain, Alien race and tech level to use - ie exactly what's hardcoded for cydonia.  Ideally, multi part missions would be supported in config.

The rewards and penalties for failing the mission (or letting its timer expire, if it has one) might be

- win/lose the game
- lose support of a specific country
- unlock part of the tech tree
- specific items
- unlock alien races / ufos / tech levels (ie they only start appearing after the scripted mission)

Any thoughts on whether anyone else might find this useful or desirable? 

3
Programming / Ufopaedia screens for Armor and Vehicles
« on: August 19, 2014, 01:06:26 am »
I'm new to openxcom and decided to take a look at the source code for my own amusement - it is a very nicely coded project and lots of fun to play with :)

One of the minor things that irritated me on the original was the inconsistent look of the ufopaedia screens, especially that the screens for new armor and vehicles looked really uninspiring despite these techs being a major deal in the game.  OpenXcom has made some improvements by putting in extra information, but the inconsistent look is still there.  I thought I'd try improving this as a way to find my way around the code.

Here's how armor and vehicle screens look in openxcom (excuse white borders from sloppy image grabbing):




By comparison, this is how the equipment screens look:



By fighting with palattes to create a new background image to match the weapons/ammo pages, and adding a few (hacky) lines of code to assemble unit sprites on the vehicles ufopaedia page, I have a much nicer look for the armor and vehicle pages on my local build:




Does anyone else care about this or just me?  If anyone has any opinion on whether this is worth doing properly and submitting for consideration, let me know.

Pages: [1]