UFO:Alien Invasion

General => User modifications => Topic started by: Martin Levac on January 15, 2016, 02:17:16 am

Title: delaybetweenshots - Need More Granularity - And More Suggestions
Post by: Martin Levac on January 15, 2016, 02:17:16 am
Value for delay is 1000/v_int

I assume delay is in ms?

This means RPS (rounds per second) can only be defined as integer, i.e. 1 RPS, 2 RPS, 3 RPS, nothing in between. At higher values for machine guns for example, it's the same thing, but less obvious, i.e. 600 RPM (rounds per minute), 660 RPM, 720 RPM, etc, in steps of 60 RPM or 1 RPS.

I want more granularity. If delay is indeed in ms, is it possible to have direct control of the delay ms value, rather than through a division by integer?
Title: Re: delaybetweenshots - Need More Granularity - And More Suggestions
Post by: Martin Levac on January 20, 2016, 07:26:56 am
Alien Materials size/weight should be standardized.

For example, Raptor requires 1,400, while various encased ammo require 5. Alienmaterials size 1. Ratio of 1,400:5, or 280 ammo equivalent to build a whole Raptor dropship. That's completely inconsistent in my opinion. Don't know if materials should have weight, but let's use weight as basis for consistency. I propose:

- 1,000 alienmaterials per 1 kg (so 1g per 1 alienmaterial)

This means alien ships would provide tons more materials, but then building ships (and other items that require materials) would also require tons more materials in consistent proportions. For example, let's say a Stilleto weighs around 20t, so materials equivalent 20,000,000 (doesn't require alienmaterials but that's our starting point for weight). Let's say dropships weigh about 2x and up, so 40t and more according to passenger capacity and whatnot. Based on alien craft descriptions, that gives us craft weight, therefore alienmaterials provided from disassembly. Aliens are likely much more efficient in their designs and constructions, so alien ships would provide less materials than humans would use to build their own. For example, if Stilleto is equivalent size as alien fighter, and if Stilleto required alienmaterials to build, even a brand new alien fighter couldn't provide enough materials to build a new Stilleto, maybe something like 50-80% only, or 10,000,000-16,000,000 alienmaterials.

Ammo and other things that require alienmaterials would require proportional quantities based on that standard weight/qty ratio I proposed. Some leeway for design decisions, such as is the whole cartridge made of it, or just the bullet, or even just part of the bullet? So for example, if 1 round of standard assault rifle ammo (just the bullet, not the whole cartridge) weighs around 4g, this gives us a ratio of ship:bullet 5,000,000:1 (individual bullets, 4g per bullet), 167,000:1 (30 round mag, 120g per mag), 50,000:1 (100 round mag for the hmg, 400g per mag), and so forth. Obviously, we could make thousands of rounds of ammo, but then ships would require a proportional amount of materials to build too, so it would still be a choice between making ships and making ammo/weapons/items, and of course alien ships would provide less than sufficient materials to begin with. To maintain consistency, total required alienmaterials should be less than total weight of the item produced. Production time could be adjusted to account for transformation complexity of alienmaterials from one form to another, such as from a sheet that comes from alien ships, to a complex shape that make up a rifle, and so forth. If we build a ship from sheet that comes from a ship, then there's much less transformation involved, production time should reflect that too. In other words, it takes proportionately more time to make different shapes, and proportionately less time to make similar shapes. But then we're making a ship, it takes a whole lot of time compared to making just a few mags of ammo. And it takes tons more materials to make a ship, so that's still a difficult decision for the player.

I realize this would probably require a significant overhaul of the existing qty system, but I believe it would significantly improve gameplay. There isn't any coding involved, I think it's just *.ufo modding, so I guess I could do it myself. I'll see if I can get off my lazy bum. I have to ask if there's arbitrary qty limits on game items, or is it just the 32 bit limit? I don't want to start just to find out I can't actually set alienmaterials qty to millions. Just a quick calc, if it's just 32bit limit, it's possible to disassemble about 100 alien ships before going over, and that would take a long time already, even if we make nothing out of the materials and we just keep piling it up.
Title: Re: delaybetweenshots - Need More Granularity - And More Suggestions
Post by: Martin Levac on January 20, 2016, 09:41:30 am
An attempt for standard alienmaterials weight/size system.

OK, so qty limit is signed 32bit, so ~2B max. Doesn't really matter since base storage cap is much lower than that. Base storage uses size rather than weight, easy to convert qty. So, 10,000 / 300 * 10,000,000 = 334,000,000 storage capacity for 1 storage building. Should put cap on number of storage buildings to avoid the s32bit limit, 6 should do. This new storage capacity system probably affects all other items that have both size and weight, I'll see how that goes. For a start, weight should be equal to size, only for storage purposes. If item is bigger in size than weight, then it's also possible to do that, I guess. For example, assault rifle size 20 weight 2,800. With new system, size is obviously bigger than weight, the rifle is not one piece of solid mass. For stored alienmaterials, there's no weight currently but description says it's very heavy, so size would be smaller than weight if it had weight. This then means items which can be made from it, but are used in existing weapons like EP ammo or RPG rockets for example, would weigh more than the standard version, but be of the same size obviously because the weapon itself doesn't change. This becomes significant when a soldier can only carry so much weight, i.e. more of the weaker ammo, or less of the more powerful ammo.

QTY alienmaterials from disassembly of alien ships, based directly on current (qty) numbers in components.ufo. And some example qty for ship/item build in workshop, also based directly on alienmaterials requirement for human ships, and/or item weight (encased plasma ammo in this example) as relationship to 1,000 = 1kg.

scout (300) = 10,000,000
fighter (430) = 14,400,000
harvester (750) = 25,000,000
supply (480) = 16,000,000
gunboat (700) = 23,400,000
corrupter (1100) = 36,700,000
bomber (1400) = 46,700,000

dragon (700) = 23,400,000
starchaser (800) = 26,700,000
singray (1000) = 33,400,000

raptor = (1400) = 46,700,000

assault rifle ep ammo 500 (item weight) = 250
machine gun ep ammo 1500 = 750
sniper ep ammo 500 = 250
shotgun ep ammo 600 = 300

Using half qty for ammo, reasoning is not the whole bullet is made of it, not the whole cartridge is made of it, some is used by explosives/plasma/propellant/whatever.

I just tried it with a 68% harvester, got about 23M alienmaterials from it (lucky RNG I guess). UI doesn't display numbers properly (can't see the whole numbers, it gets cut off), but otherwise it works fine for when building stuff or getting alienmaterials from disassembly. I'll keep fiddling with it until I get something solid, then maybe I'll make it available as a mod.
Title: Re: delaybetweenshots - Need More Granularity - And More Suggestions
Post by: Martin Levac on January 20, 2016, 01:51:40 pm
Standard size/weight alienmaterials continued.

Using real world weight values of similar things as point of reference.

base reference for size/weight ratio - shiva 20mm cannon

Real world 20mm M61 vulcan aircraft cannon weighs over 100kg without feeding system, so probably half more with feeding system, + 100kg more with 100 rounds ammo load (so 1x 20mm round = 1kg). So size 40 for craft weapons = 250kg weight. For the purpose of size/weight ratio of alienmaterials required to build alien craft weapons, I use x0.8. For example, pbeam size 90, weight 562.5kg, x0.8 = 450,000. For missiles, adjust to account for propellant/explosives/plasma/whatever.

weapon name - weapon size - ammo size - ammo amount - AMT req weapon - AMT req ammo

shiva 40 10 100

sparrow 110 40 7
tr20 90 10 12

pbeam 90 10 10 450,000
alauncher am 110 60 6 550,000 375,000
alauncher hb 110 50 6 550,000 250,000

alaser 40 10 40

The alien launcher is basically a giant cannon that fires dumb missiles at high velocities. The sparrow missile rack is different in that it weighs almost nothing, most of the weight comes from the missiles themselves. But what determines on which hardpoint weapons can be installed is size, and that's also the only size/weight value I have to work with now, so I'm leaving it alone until size/weight can be distinguished in craft weapons.

There's two different types of alien shield plating, they both have the same size 50, but different materials requirement - 150 vs 250. I'm just using best guess here to avoid changing size value since maybe it's important for hardpoint installation.

All values I could find that I changed to match alienmaterials/size/weight 1,000 = 1 kg system. Derived from (current item weight x 0.8) to reflect heavier weight of alienmaterials vs size of standard item versions where applicable, and principle that not the whole item/weapon/ammo is made of alienmaterials. It's a basic abstraction of all these ideas. In order from research.ufo.

require_for_production alienmaterials #

RPG hybrid ammo 1000
Bolter AM ammo 700

Monoknife 240

GL plasma ammo 1200

Plasma pistol 1200
Plasma pistol ammo 160
Plasma blaster 4000
Plasma blaster ammo 800
Plasma blade 800
Plasma grenade 480
Plasma rifle 2720
Plasma rifle ammo 320

EP assault rifle ammo 250
EP MG ammo 750
EP sniper ammo 250
EP shotgun ammo 300

Needler 4800
Heavy needler 7200
Needler ammo 800

Coilgun 6080
Coilgun ammo 900

Particle beam pistol 1040
Particle beam cannon 4800
Particle beam rifle 2720

Raptor 46700000
Dragon 23400000
Starchaser 26700000
Stingray 33400000

Alien aircraft plating 250000
Alien polymer armour 437500
Particle beam weapon 450000
Alien launcher 550000
AM missile 375000
Hybrid missile 250000

Recommended base storage capacity.

Per storage building = 350M
Per base = 5x storage buildings max = 1.75B

This allows about 10-30 alien ships disassembly before requiring extra storage capacity, and 50-150 ships disassembly at max capacity, if nothing else is stored in base. That's not how it's actually going to work, since materials/weapons/items will get used up to make new ships, equip them, make rifles/ammo/etc. It's going to work pretty much the same as it does now, except with a new size/weight value system.

I haven't changed any other size values for stuff that don't require alienmaterials, but that must be done otherwise we could store thousands more of those items due to new storage capacity value. That's what I'm going to do next. Oh yeah, forgot, I'm using 2.6dev nightlybuild 2016-1-15.
Title: Re: delaybetweenshots - Need More Granularity - And More Suggestions
Post by: DarkRain on February 03, 2016, 07:08:05 pm
What I don't get is why are we using alien materials on hand held weapons in the first place, I'm looking specially at the mono molecular blade and the particle beams, which UFOpaedia article semm to imply alien materials aren't needed.