Jump to content

Apoc'd


j'ordos

Recommended Posts

Thanks, I'm fine with just positive comments instead of donations (for now :D )

 

*positive comment

*more than positive comment

*extremely positive comment

*mega positive comment

*ultra positive comment

*giga positive comment

*tetra positive comment

*additional positive comment

*exceptional positive comment

*vertical positive comment

*awesome positive comment

 

enough? ;)

Link to comment
Share on other sites

I'm afraid turning the wolfhound into a flying truck is impossible though, there's a separate set of images for ground and flying vehicles. So you can turn it into a flying unit but you'll have to use one of the existing flying vehicles as a graphic.

The Wolfhound actually looks like an UFO now because I never bothered to adjust the graphics but it works so I'm happy. =)

 

Although... weird things happen if you use the copy / swap feature to change the sort order of your soldiers.

 

I tried to sort them "right" so my squads would be displayed in order. At first glance, it works.

Then if you equip them, you can get soldiers that mirror each others equipment or have it cross-linked.

 

This only happens with soldiers, not vehicle equipment.

 

Often these effects are not noticable until you save / reload.

Then the equipment is sometimes gone (like placed on a non-soldier and therefore invisible) or ends up on other soldiers.

It must be something weird with the inventory ID not being copied over or duplicated or whatever.

 

Editing Savegame -> Agents, I found that Inv IDs 12 and 13 were assigned to 2 soldiers each.

 

I haven't tried to properly reproduce it, yet. Just an observation of weirness...

Link to comment
Share on other sites

The Wolfhound actually looks like an UFO now because I never bothered to adjust the graphics but it works so I'm happy. =)

 

Although... weird things happen if you use the copy / swap feature to change the sort order of your soldiers.

Yes. Currently, you have to edit the backpointers in Agent Inventory to the Agents as well. This is not that painful, but there is currently no automatic repair facility.

 

I haven't decided whether to install FreeBasic yet simply to implement automatic repair. I do have the installers downloaded.

I tried to sort them "right" so my squads would be displayed in order. At first glance, it works.

Then if you equip them, you can get soldiers that mirror each others equipment or have it cross-linked.

 

This only happens with soldiers, not vehicle equipment.

 

Often these effects are not noticable until you save / reload.

Then the equipment is sometimes gone (like placed on a non-soldier and therefore invisible) or ends up on other soldiers.

It must be something weird with the inventory ID not being copied over or duplicated or whatever.

 

Editing Savegame -> Agents, I found that Inv IDs 12 and 13 were assigned to 2 soldiers each.

Very familiar. This effect (when doing this in a raw hex editor) triggered my hunting down the agent inventory offsets.
Link to comment
Share on other sites

Yah, I now saw what happens.

 

Sure you can reorder the soldiers but you have to be really careful about updating the corresponding link in "agent inventory".

 

Preferrably, Apoc'd should update the index in agent inventory when performing a swap that involves soldiers.

When cloning / copying, I don't think that's needed. In that case you're generating new records anyway and that's easy to keep track of.

It's just the royal mess you end up with when swapping agents around. That's nasty. =)

Link to comment
Share on other sites

Ah yeah I forgot about that, I'll try to figure out a solution for the next update!

 

edit

I haven't decided whether to install FreeBasic yet simply to implement automatic repair. I do have the installers downloaded.

No harm in having a second coder on the project :D

Link to comment
Share on other sites

*positive comment

*more than positive comment

*extremely positive comment

*mega positive comment

*ultra positive comment

*giga positive comment

*tetra positive comment

*additional positive comment

*exceptional positive comment

*vertical positive comment

*awesome positive comment

 

enough? :D

Just for that, I figured out a way to edit cityscape maps for you ;) It's actually still in the game.

 

well I'll just copy the post I made about it over at xcomufo:

Incredible news! (lucky it's not april) it looks like there is a fully functional map editor already in the game itself! I'll have to do some more checking first as it seems too good to be true (in which case I screwed you all over good ) but here's hoping!

 

edit: it works fine so far Slight annoyance: scrolling through the tiles is slooow.

So, how do you do it? First, open up UFO2P.EXE in your trusty hex editor. Then search for

40 01 80 3D 24 13

It should be followed by 0X 00 00 74 1B (0X was 01 in my US version and 0E in my EU version). Anyway you just gotta replace the 74 1B with 90 90. If you try to fire up xcom apoc at that point it'll just ask for the cd in a messed up palette. It's actually looking for a file in the ufodata folder called citydemo. (without extension) So, just copy one of the other citymapX files and rename it to citydemo. I also copied&renamed the corresponding .BLD file though I'm not sure it's necessary. At that point you're ready! Just launch apocalypse and instead of the main menu you'll get the map editor. There's also a bunch of other tools there I haven't tried yet, but beware of that 'Grabber' button, it allows you to import graphics I guess (from a folder called newgrf by default) but if you enter an invalid file (and I haven't been able to find a valid file yet) you're screwed, and it remembers your choice even if you restart xcom afterwards somehow. So keep away for now

To restore xcom back to normal replace the 90 90 again with 74 1B. There's no harm in keeping the extra city files in the ufodata folder.

it also allows you to edit tile properties (same as the one in my editor but WITH graphics and a few more of the unknown values explained. Looks like there actually is both constitution AND strength), buildings (owner+type) and then there's an agent face editor and organization editor which both look for files that are not there so are probably not that useful.

post-3849-1262883717_thumb.png

post-3849-1262883732_thumb.png

Link to comment
Share on other sites

  • 3 weeks later...
Yes. Currently, you have to edit the backpointers in Agent Inventory to the Agents as well. This is not that painful, but there is currently no automatic repair facility.

 

I haven't decided whether to install FreeBasic yet simply to implement automatic repair. I do have the installers downloaded.Very familiar. This effect (when doing this in a raw hex editor) triggered my hunting down the agent inventory offsets.

A new version of apoc'd is now available from the files section which should properly swap agents around. It also adds the built in equipment sets used by aliens without an inventory such as spitters or megaspawn.

Also be sure check out the new version of roadwar. It allows you to disable stun raiding, force guards to be present during investigations and increase the limit on guards present during battle (though you'll need apoc'd to actually increase the numbers). You could say it got a little sidetracked. :D (couldn't resist)

Link to comment
Share on other sites

  • 2 weeks later...
Well, that's too bad. I'm undergoing the rigorous structure of IB right now, so I'm pretty busy. Hopefully, you'll get it soon! Can't wait to research and build my own cannons instead of raiding ships and buildings for them... :D Thanks for all your work on a "dead" game. :) Keep up the awesome work!

 

P.S. I'm already halfway done with the statue, though!

 

It's three years later, but I finally managed to get the DD to do damage. Open up TACP.EXE in a hex editor and search for

75 30 8B 5C 24 02 0F (offset for english (not steam) version is 762445, decimal)

Change the 75 into EB and it should work!

The tracker gun also is an exception, instead of dealing damage it executes some code which, I guess, makes the target visible on the multitracker.

edit: you can now do this automatically using Apatcher (available from the files section)

Link to comment
Share on other sites

  • 1 year later...

Hey J'ordos. Would it be at all possible to change the

characteristics of fire using Apoc'd?

 

I would love to be able to mod either of the following:

 

a) make fire do more damage to creatures that are set on

fire. As it is, soldiers on fire take almost no damage

due to their armour. Possibly there's a way to make the

armour less resistant to fire?

 

b) I experimented using Apoc'd to try to give the incediary

grenade the 'damage type' of the entropy ammo.

So the effect would be that creatures in the blast radius would

have armour burned off by the fire.

But no joy. It seems to mess up the explosion graphic and

the game effect. Do you think it's possible?

 

c) make fire spread faster. Could this be done by tweaking

the terrain's vulnerbility to fire?

 

Thanks for APoc'd! It's awesome. :(

Link to comment
Share on other sites

  • 3 weeks later...

Hey jos, I'm still around, though it's been quite some time since I last worked on apoc'd or disassembling apocalypse!

Regarding a) I suppose editing the damage modifiers for incendiary should work, assuming fire uses that damage type at least, don't think that's ever been tested.

b) sounds like something that won't work without editing the code, kind of like my attempts to edit the brainsucker launcher to fire grenades instead.

c) again could work, if the fire uses incendiary damage type :( Sorry I can't give any real help here, it's been a while :(

Link to comment
Share on other sites

Hey jos, I'm still around, though it's been quite some time since I last worked on apoc'd or disassembling apocalypse!

Regarding a) I suppose editing the damage modifiers for incendiary should work, assuming fire uses that damage type at least, don't think that's ever been tested.

b) sounds like something that won't work without editing the code, kind of like my attempts to edit the brainsucker launcher to fire grenades instead.

c) again could work, if the fire uses incendiary damage type :( Sorry I can't give any real help here, it's been a while :(

 

Ok, thanks anyway J'ordos. Apoc'd has allowed us to change some

really important stuff and make the game much harder (which was

always my no.1 wish)

 

There is hope BTW for the future of Apocalypse modding:

 

https://openxcom.org/forum/index.php?topic=287.0

 

Maybe you could contact these guys and offer your

extensive knowledge of the .exe, J'ordos?

I've already offered my help and am really hoping this

project comes to something!

Link to comment
Share on other sites

  • 2 weeks later...

Hey J'ordos -(or anyone who has experience of Apoc'd)

I have a question concerning editing armour in Apoc'd:

 

Essentially, I want armor to loose durability quicker. Unfortunately, when

I decrease megapol's armor damage resistance (by increasing the number,

which it seems means % damage taken - so 200 means it takes 200% more

damage) it seems to work fine by degrading the armor more severley.

But the problem is it seem to add a load of damage to the soldier underneath!

At least, this is what appears to happen, and in my tests the soldiers also

seem to take 200% damage therefore dying really fast. Not what i want.

I only want the armor to take more damage.

 

Do you have a better understanding of how the damage modifiers work

in Apoc?

Link to comment
Share on other sites

  • 11 months later...

J'ordos! I've just noticed that the latest version of apoc'd has the feature that I've been watching for... as long as I remember: I can now choose which damage types will ignore disruptor shields! smile.png

 

I'm pretty happy about that. I'm going to start testing and rebalancing a new & improved version of my mod. It's still just going to be a balance mod, but I've got a few ideas.

 

One minor question: suppose I want to repurpose one of the existing damage types. For example, I might choose to rename the "dimension destabiliser" to, say "direct plasma" and then make it ignore disruptor shields, and let power swords use that damage type. There's a slight problem: the Battlescape icon for that damage type is a question mark. Is there any way to change that icon? Also, for the plasma sword, no matter what I set the damage type to the mouseover text always says "Hot plasma". I suppose that's hardcorded or something? I'm not sure. -- If I work something out I'll let you know; but I can't see any 'unknowns' which could be used for the damage type icon or mouse-over description.

 

-

Here's a little bit of info for the savegame editor.

 

Savegame -> Battlescape -> units:

Unknown 17 = Days of service

Unknown 18 = Total number of kills

Unknown 19 = Number of missions

Unknown 20 affects how many medals the agent has, but I don't know exactly how it works. (bigger score -> more medals, but that's all I can say.)

 

That's all I've got for now, but I'm currently trying to work something out, so I might have some more info shortly.

 

 

By the way, why is 'Apatcher' a separate tool? Can't that functionality be included in apoc'd?

Link to comment
Share on other sites

Ooh, new replies :) Don't really know anything about how armor&damage modifiers work for xcom troops unfortunately.

About the damage types in the battlescape, AFAIK that's hardcoded. There's a string list in TACP.EXE for damage modifier types, I think it just follows the internal ordering of the weapons, so there's no 'unknown variable' somewhere that can be edited. The only way to fix it is to open TACP.EXE with a hex editor, search for hot plasma and edit it yourself. Remember that you may not exceed the length of the original text! Unfortunately there's no way to export such an edit using apoc'd yet. I don't know anything about the damage type icon.

Thanks for the info on the unknowns, I've been working on apoc'd and my other xcom apoc stuff again some time ago. I actually have a new version ready, but it just adds support for another spanish version of xcom apoc. I'll try to finish it up.

 

There's no really good way to integrate apatcher into apoc'd I can see, apoc'd edits data structures whereas apatcher patches the game's code. Can't really use the existing apoc'd UI for that.

Link to comment
Share on other sites

@jos, I don't really know much about that stuff either, but I suspect that you might be able to decrease the durability of the armour directly. In apoc'd, armour has 2 'strength' values in different places. Notice that when you're in-game, if you point to your armour it will say something like "protection: 32/32", well each of those '32s' correspond to a number in apoc'd. ie. you can change them independently.

 

Now, I'm not certain about this, but I have a hunch that the first number corresponds to how close the armour is to breaking, whereas the second corresponds to how much protection the armour gives to its wearer. -- You could try setting the first number to something low so that the armour breaks quickly. But you should test it to make sure it doesn't actually decrease the protection of the armour! (If those numbers are "current protection" and "maximum protection", then you may just end up with weaker armour...)

 

@j'ordos, You're right about the names of the weapon damage types. My guess is that the icons are probably in a similar list somewhere, but of course it will be much harder to find the list of icons because they won't be human-readable. And it might be a direct list of bitmap images, or a list of file names, or a list of icon indices or something... I guess I'll just give up on that particular thing for the time being.

 

.. and also, the thing I said I was trying to find out... it didn't work. I had a hunch about what one of the equipment unknowns was, but I now think I was wrong. sad.png

 

[edit]

In the save game editor of apoc'd, some of the agent names have random characters at the end which don't appear in-game. By looking at the hex I can see that apoc'd is displaying all characters even after the '\0' which marks the end of the name.

Link to comment
Share on other sites

The two values for armor are just current vs max durability. I.e. should you edit armor to read 18/32. Each part will be repaired over time to 32/32 in the cityscape.

Ah I know about the garbage in the names in savegames, I guess it's an easy fix, just never bothered to do it :) What was the hunch?

Link to comment
Share on other sites

I don't think you're right about the armour. In apoc'd, if I select 'Edit Battlescape' -> 'Agent Equipment 2', and change the 'armor rating' of, say, the megapol helmet to be 150 - then in the cityscape it will only say '150', but in any tactical mission it will be 44/150.

 

Incidentally, the hunch was that 'unknown 2' for armour might be a brain-sucker resistance thing - because I know from experience that x-com armour gives better protection against brainsuckers, and that's the only one with non-zero for that unknown... But it didn't seem to make any difference when I set it to something very high. Furthermore, I when I tested the effect of the 'armor rating' I found that helmets with high armour rating give protection against brainsuckers. So that's that.

 

The results of these brainsucker tests are actually very relevant to the discussion about armour durability. In the brainsucker tests, only the second armour number was set high. ie. agents wearing a helmet with a rating of 44/150 always successfully resisted brainsuckers. With that in mind, I reckon that if I set the armour to be 4/80, or something like that, the result would be armour which offered excellent protection but was easy to break. (It would certainly offer excellent protection against brainsuckers, but I haven't tested it for other damage types.)

 

Anyway, I now have no idea what 'Unknown 2' for armour might be.

 

For weapons, I wonder if one or more of the unknowns might be related to how the AI handles the weapon... eg, so that they don't try to fire a heavy launcher at something standing right in front of them... but on the other hand, the AI sometimes does make blunders like that. -- I don't intend to do any more testing on that in the near future, but if I work something out I'll let you know.

Link to comment
Share on other sites

j'ordos, I think I have some information for you.

 

In Cityscape -> UFO Missions, I'm pretty sure that Unknown 10, 11, and 12 represent a "retreat threshold" for types 1, 2, and 3 respectively.

 

My testing has not been rigorous, but I'm pretty sure the number is the percentage of health below which the alien ships will abort their mission and retreat to the dimension gate. For example, if you set it to 100, the ufos will retreat as soon as they take any damage. But if you set it to 0 they will never retreat due to damage.

 

I've only tested it on 'alien drop' and 'escort', and I've only tested extreme values like 1 & 99. -- But all that has worked, and since most of the normal values are around 20-40, I'm pretty sure it's a percentage.

Link to comment
Share on other sites

Thanks karadoc, I'll add those to apoc'd.

 

 

Savegame -> Battlescape -> units:

Unknown 17 = Days of service

Unknown 18 = Total number of kills

Unknown 19 = Number of missions

Unknown 20 affects how many medals the agent has' date=' but I don't know exactly how it works. (bigger score -> more medals, but that's all I can say.)

[/quote']

 

Unkown 20 will probably be the amount of VPs then, as you can find in this table here: https://web.archive.org/web/20000303144754/www.mythosgames.com/xcom.htm

Or possibly it is a counter for the number of wounds the agent has had.

 

I don't think you're right about the armour. In apoc'd, if I select 'Edit Battlescape' -> 'Agent Equipment 2', and change the 'armor rating' of, say, the megapol helmet to be 150 - then in the cityscape it will only say '150', but in any tactical mission it will be 44/150.

...

The results of these brainsucker tests are actually very relevant to the discussion about armour durability. In the brainsucker tests, only the second armour number was set high. ie. agents wearing a helmet with a rating of 44/150 always successfully resisted brainsuckers. With that in mind, I reckon that if I set the armour to be 4/80, or something like that, the result would be armour which offered excellent protection but was easy to break. (It would certainly offer excellent protection against brainsuckers, but I haven't tested it for other damage types.)

 

 

You may be right, I never checked if damaged armor had to be repaired or not - just assumed so :) .Let me know if armor effectiveness drops vs weapons fire & explosions if the remaining durability is low.

Link to comment
Share on other sites

You're right about the VP points. That's definitely what unknown 20 is.

 

Also, here are a couple of other things about save-games

My guess is that Unknown 32 is "max TUs" with the current level of encumbrance. It's the number of TUs you have at the start of the turn. But changing editing it in the save doesn't make much difference because it is recalculated again at the start of the turn.

 

Strength (copy 1) is Max Strength,

" (copy 2) is current strength,

 

Similarly for Morale, Stamina, Reactions, and Psi energy -- but strangely, for Psi Defence it's the other way around. ie.

Psi Defence (copy 1) is current psi defence, and (copy 2) is max.

 

----

 

By the way, do you happen to know how alien equipment is assigned? I've noticed that when the aliens start getting personal teleporters, fewer of them seem to carry disruptor shields. Based on a comment in the "Unit Stats" section, I gather than the equipment for antropods and skeletoids is determined by "Equipment Sets (score)"; but haven't been able to match what I see in that section to what I see in the game.

 

My guess is that the equipment assignment is failing because the aliens don't have enough inventory space. Here's my thinking:

 

I assume that since I'm seeing personal teleporter in the game, that means the aliens are using level 8 equipment sets - because those are the only sets that have teleporters.

 

Now, in the level 8 section, there are lots of different things. There are 10 weapon types, 10 grenade types, and 10 "other equipement" pairs. A first I thought the type numbers were matched for these three things such that, for example, if an alien has weapon type 3 then that means they'll have grenade type 3 and other equipment 3. -- But I just checked the equipment of a few aliens I saw in the game, and they don't match up in that way. So, my next guess is that they just get a random thing from each category. ie. a random weapon type from 1-10 plus a random grenade type plus a random 'other equipment' pair. Is that right?

 

For the 'other equipment', the reason I'm saying 'pairs' is because there is 1A, 1B, and 2A, 2B, and so on. From context I assume this means that the aliens are meant to be getting A and B from whichever 'other equipment' number is assigned to them; but I'm sure this isn't actually happening, because a few of the aliens I've actually checked are only carrying one 'other equipment' items, while every A/B pair at level 8 has two items.

 

My guess is that when the equipment is being assigned, it doesn't allow the 'other equipment' stuff to be placed into the alien's left hand, and the aliens don't have enough room in their backpack, and so the items simply don't get placed. This means that aliens who lots of grenades are likely to miss out on their shields; and same for aliens who get brainsuckers or dimension missile launchers (because the ammo takes up significant amounts of inventory space).

 

It would be nice if it skipped grenades rather than skipping the special equipment.

 

Do you think I've understood that correctly? I'm going to try reducing the number of grenades and swapping the order of a couple of "other equipment" items to see if it helps - but this is a pretty late phase in the testing of my mod to be changing stuff which might break something...

 

--

 

[edit]

Regarding this:

Let me know if armor effectiveness drops vs weapons fire & explosions if the remaining durability is low.

I set some armour to be 1/150, and it didn't seem to protect my agent against devastator cannon fire. - So I think the effectiveness does drop when the durability is low. (except possibility against brainsuckers...) Maybe some more testing is needed to be sure.

Link to comment
Share on other sites

My guess is that the equipment assignment is failing because the aliens don't have enough inventory space. Here's my thinking:

 

In Enemy Unknown or TFTD, equipment not showing up on aliens would point to 1) too many aliens, and 2) each alien carrying too much stuff. This would fill up the item table fast. I assume there is a list of weapons in Apoc in which the aliens use when equipped. For example in EU, the aliens would be assigned their guns first, then clips, and then grenades. If you have too many aliens needing weapons and clips, it might prevent grenades from showing up etc. In EU the aliens can only get 5 items total assigned to them, but on big ships like the battleship there could be 22 aliens requiring items which could add up to a potential of 110 items. That's a heck of a lot more than the item table would allow. EU curtails this by limiting the aliens to a gun, two clips and a grenade for most, and a heavy gun +4 reloads for the other "special" aliens.

 

Is there an item table for missions in apoc? If so, how big is it? My guess is that the table is getting filled and thus some aliens are shorted their shields. ;)

 

- Zombie

Link to comment
Share on other sites

That's interesting about about the European Union. I'm not sure if a table like that exists in Apoc or not - but I reckon that even if Apoc does have the same problem, it isn't what's causing the missing disruptor shields.

 

The few alien inventories I surveyed for my previous post were in missions that had hardly any aliens. My own troops were armed to the teeth, so that would have taken up a lot of space in any equipment table; but if the total limit was being reached so early then I'd expect there to be a much larger problem in larger missions - so I don't think that's what's happening here.

 

Incidentally, I saw a weird bug with an alien inventory yesterday. I had the alien mind-controlled, and I saw in their inventory that all their stuff was stacked into the same equipment slot (except for their gun). The left leg box thing had a bunch of entropy clips, a couple of vortex mines, and a couple of other things - all stacked into the same spot (which can usually only hold one item).

 

For such a bug to be possible I guess the item data must point to the inventory slot rather than the inventory slot pointing to the item data. But I got that when outside of tactical missions it was the other way around. ie. the geoscape save games seem to store items by listing what is in each inventory slot - in which case the bug I saw would be impossible.

 

So based on that, my guess is that the tactical mission data does use an equipment table. - Nevertheless, I don't think it is the cause of the missing shields.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...