Menu

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.

Show posts Menu

Messages - Xnope

#1
Trying to package a core library with my mods, but I don't want to double load it if several of my mods exist in the same mods list. Double loading works fine, the game plays, but a slew of errors come about and I have a hunch it's not very good practice.

Any way to use HugsLib (or just Verse) to detect if an assembly is already loaded, then halt loading it again?
#2
I just tested removing the mod while they are on their way, and yeah I see what errors you were getting. I really need to add in that nuke mod setting, that would fix it. I already wrote the function that does it but now I need to go learn how to use HugsLib settings. It will definitely be in v0.0.9.

Edit: So yeah apparently since some old change I made with factions an ambiguous amount of time ago, you will get errors when removing the mod regardless if they are on their way or not. This necessitates a nuke function. Should have been my #1 priority a while ago :O

I just tried updating from 0.0.7 to 0.0.8, even when they were already on their way, and it was fine. They still showed up, and when they did the new calculations from 0.0.8 were used. So that's some good news. I tried updating while they were actually in town (hopefully nobody thinks of doing this, but I thought I should check), with limited success. Everything still worked fine, but if in dev mode you'd notice a wall of errors related to tent doors. I'm working to fix these, for performance's sake.

Edit 2: Here is v0.0.9. The only difference is it has the nuke mod setting. I tested it and it works for uninstalling. Use it, deactivate the mod, then load the new generated save file with the '_Nuked' appendix. Only skip the deactivate part if you're just trying to fix a broken thing, otherwise it makes the nuke pointless.

[attachment deleted by admin: too old]
#3
I'm so sorry. Try duplicating your save and removing it, I don't think anything will fuck up, but then again I fucked up your game already so take me at face value. I haven't touched v0.0.7 in a while, what's on GitHub is roughly 30 commits ahead.

Anyway. For those who want to try a stabler version, I'm uploading v0.0.8. As per PixelBitZombie's experience above, back up your saves.

The issue where they are erratic where they set up and have too big a setup radius has been resolved, among many others. There are now shows, which your colonists will automatically attend if they paid entrance and have nothing else they were ordered to do. Attending shows gives stacking mood buffs, which last 10 days, after which a small debuff happens (-3) for 5 days (this is for balance).

Edit: About the memory issue, that is likely from having too many mods. It's no specific mod's fault, but my cell calculation and pawn spawning (especially the ones in 0.0.7) is heavier than the default raid calculation, so that would lead to a memory issue if you have a lot of mods running. Again, sorry man. If you have the urge to, try 0.0.8, but I don't blame you if you take out this mod and maybe wait for release.

[attachment deleted by admin: too old]
#4
Quote from: alsoandanswer on August 12, 2017, 01:10:05 PM
Bug :

So when the carnival was in town, hooray! Finally, I can see what this mod can do

until a mad caribou chased them ALL AWAY.

So I decided to reload and pick up from an autosave.

But for some reason, when they enter the map, all the people immediately leave, even though it's on an autosave BEFORE the caribou attack.

Also, the muffalo are still there, waiting for their masters to finally unload them
(not gonna happen, though.)

Sorry guys, yeah I'm aware of that bug where they just leave immediately and how they leave after any violent thing happens (I've since fixed it, but haven't uploaded a release yet). Right now I'm working toward implementing shows that give attending colonists large, lasting mood boosts. I'll probably upload an update by tonight. There are a ton of improvements and bugfixes since the last alpha release.

Worth mentioning that I've been working on my own video game recently and have been quite inactive in the modding scene, but I'm trying to balance that with this project so that this gets finished. Thanks for the feedback! Hopefully with the help of you wonderful folks, this thing will be bug-free for release. There are so many moving parts, it's quite a challenge.
#5
Quote from: Soupy Delicious on July 21, 2017, 11:57:07 PM
Gotta make that point about commonality of carnivals happening, though. To make this mod fit in seamlessly with the vanilla experience you're going to have to work hard to make sure it doesn't make you feel like your colony is the centre of the universe, or make it feel like there are millions of carnivals scouring the planet. Either one of those have the same effect, and take you out of it.

Feel you completely on that. That is definitely the goal for release. However as I mentioned above, I'm making it relatively common right now so it actually happens for testers. Testing with devmode shortcuts is one thing, and I've done that on my own thousands of times, but it's a completely other thing to test it happening organically, and it's harder for me to do on my own. But yeah, for release I was thinking of a mean time between occurrences being around a year. It could happen earlier, it could happen later, and different factors dynamically change this average chance.

In the meantime, I need to focus on implementing the main event tent functions.

However, I'll hit you guys with an UPDATE (v0.0.7). It's got some necessary bug fixes and rebalances, and once again improves dynamic placement calculation. Find in OP.

Oh and it is now packaged with XnopeCore (I'll be doing this from now on), so make sure to delete your existing XnopeCore folder.
#6
Ah. Yes, it does mean Mean Time Between. Tynan's implementation through his custom RNG is interesting, to say the least. I'm still trying to wrap my head around it. If you guys are interested in how it is basically supposed to work (I think), see this wiki page.

The use of exponents are not included in his method MTBEventOccurs(), but there must be some bit shifting going on in the cascade of RNGs that it relies upon, which would lead to generated numbers following 'random' exponential trends.

Damn him for being so smart :|
#7
It's used in many pieces of source code that have to do with random events occurring. I believe there are also some values represented in defs. I think it might mean 'minimum time before', but in some cases this doesn't make sense, i.e. with mtbDays for parties being 40 yet in-game you can have way more parties within 40 days than just one. I dunno. If anyone knows more, I'd appreciate the knowledge :)
#8
I like your ideas about the psychic soothe mechanic. I could make this only fire if a psychic soothe was going to fire, and then it flips a coin. The coin would be weighted by the previously stated factors, like your map's proximity to roads and the population curve.

Oh and I wasn't going to make an actual grave to dirty the player's map for carny burial, it would just be a little moment with maybe some temporary graphics and then it would 'destroy' the corpse. I thought it was more immersive this way, because traveling caravans in the old west would bury their dead wherever they were, wherever they could. Should have been clear about that. And as for nonsensical spots being chosen, as you might notice (especially in the next update, holy shit I spent a lot of love in geometry) I'm pretty good at on-the-fly cell calculation.

The beastmaster ability is going to be a ways down the road, but I'm liking your ideas. I'm glad they're written here for future reference. If I focus on this now though, I'll be working on non-essential features and I kinda want to get this thing complete :)
#9
Help / Re: [A17] XML Patch causes black screen
July 21, 2017, 04:55:41 AM
Oops yeah I forgot to look at my actual code before replying to Sp0nge's question. What I actually had in the patch was

<xpath>/Defs/StatDef[defName = "MiningYield"]/maxValue</xpath>
#10
UPDATE! I can't even remember all the fixes I've made, it was a solid number of hours of work. At the very least, I vastly improved setup spot calculation, that bug with colonists giving up before paying the fee should be gone (bigger maps may have the problem again), and biggest of all... carnies are badasses!

I spent a lot of time tweaking their defense AI to be as intelligent as possible. I'm pretty happy with the result, though as I go along I will probably be improving it. As of my last test, a carnival with only 3 guards w/ standard ranged weapons were able to down 2 centipedes with only one casualty. No, I didn't overpower their combat power, I just gave them smarter tactics. For each carny that gets wounded, they start to intelligently defend the weak and will eventually run away. If any event like this occurs, unfortunately they will pack up as soon as the threat is neutralised.

Now that I'm thinking about that last point, I should make it so they only pack up to leave if they had casualties, otherwise they stay for more entertainment.

Oo, and they should bury their own dead.

Find download in OP! Note that it requires an update to XnopeCore v0.0.2 too.

Edit: Todo list:

  • Carnies need to tend to their wounds after combat, and I would also like them to bury their dead and have small funerals. It opens up an opportunity to have some cool 'singing' sustainers around the event.
  • I think I want to slightly increase the likelyhood of firing the event if enough of your colonists have poor moods. It would also depend on your difficulty setting. Again, we're dealing with random numbers here, so no guarantees, to maintain the difficulty of psychological survival.
  • What do you guys think about also decreasing the likelihood of vanilla psychic soothe altogether? They already can't fire together.
  • Already someone suggested having beastmaster carnies, if they spawned, being able to soothe manhunter beasts. I would balance it by having them take time and therefore damage in doing so, so they would be particularly ineffective against a manhunter pack.
  • New idea: if a psychic ship crashes, and a true gypsy carny spawns (yes, there are fake gypsies), I could have them perform some ritual that reduces the effect of the ship, but it wouldn't destroy it and the effect would be lost when the carnies leave. The balance lies in the random chance that no true gypsy spawns, that the mitigation wouldn't be total, and that the carnival doesn't stay too long.
  • Maybe the beastmaster and gypsy events would have to be requested and would cost silver.
This list is primarily for my own purposes, but I'm putting it here instead of just a sticky note in case any of y'all want to give feedback.
#11
Help / Re: [C#] How to get a pawn's health as float
July 19, 2017, 08:52:55 AM
Ah. Just needed five extra minutes of source reading. I may need some sleep.

For the interested, you would use Pawn.health.summaryHealth.SummaryHealthPercent, gives a value between 0f and 1.0f.
#12
Help / [C#] How to get a pawn's health as float
July 19, 2017, 08:43:24 AM
This may be a dumb question, but I've been pouring through the source for a half hour now. How the hell do you get any given pawn's health value as a float > 0f? I'm trying to use TryRandomElementByWeight() with a weight selector for pawns' health values, but I get errors because apparently Pawn.HitPoints returns -1. Currently the only way I can find is to programmatically calculate a pawn's health via Hediff injuries, but even that doesn't give me quite what I want AND it's pretty inefficient.

Halp.
#13
It's a small victory that the event fired. Random numbers, man. Unreliable. I could possibly make a set range of when it fires through C# instead of defs, so that it ALWAYS fires between a certain range of days, like maybe between 8-15. The way it works in vanilla is, there is a minimum of 8 days between occurrences, but after that it's completely random. You know that old thought exercise, that you could in theory flip 1,000 coins and never land a heads?

As for colonists giving up on paying the fee, you may have to just keep clicking on it once they give up, for now. Thanks for finding it, it's a priority bug on my to-do list, and I think I know how to fix it. I've got mother-in-law coming over in half an hour and it's hectic over here, so I'll be tackling it and other bugs tonight :P
EDIT: I think I fixed it, the commit is on GitHub, but I'm super tired so I'll have to upload release v0.0.6 tomorrow. It includes other fixes like preferring to use open space near the colony more, and generally better arranged buildings. Important note, it will take an update to XnopeCore v0.0.2, which I will also upload tomorrow.

Also, good idea about making a placeable spot. Seems easy to implement. Might also make a PlaceWorker that disallows it from be placed too close to the centre of your colony, otherwise it'd be too difficult to write code that makes sure it doesn't block your doors, defenses, resources, etc.
#14
Help / Re: [A17] XML Patch causes black screen
July 17, 2017, 04:02:53 PM
Yes triple check all spelling. The last char in your xpatch should not be a forward slash. See the second code in my last comment. After this, you still have to do


<value>
    <maxValue>1.15</maxValue>
<value>


or whatever you patch entails.

If you still have problems, I love solving problems, so post your code here.
#15
I've made the minimum refire days 8 for now. I may increase this for release, but it'd be easier on the testers. v0.0.5 is attached below and in OP. I forgot to mention this earlier, but their is a chance adjustment if there are roads on your map, from 1.0 to 1.5. Additionally in v0.0.5, I've added a population curve chance. Essentially, they won't even bother showing up if you have 2 or fewer colonists, they have the normal chance if you have 5, and they have double chance if you have 12 or more. See below image for what the curve looks like.



EDIT: Also thank you so much for giving this a test. I'm also having my friend test it, and I really appreciate the feedback. I didn't make this mod for me, so it means a lot to see someone else has interest in it :)

[attachment deleted by admin due to age]