[1.1] Giddy-up!

Started by Roolo, December 01, 2017, 04:46:29 AM

Previous topic - Next topic

Ser Kitteh

OP, you along with the other modders of the community, are angels amongst men. I have not enjoyed a mod this much since trying Rim of Madness. This will forever have a permanent spot in my load order.

Roolo

Thanks everyone! I'm glad you like the update.

Quote from: FrodoOf9Fingers on February 28, 2018, 04:42:30 PM
Love your work so far!

Is there a chance to modify the functionality of the "Release Animals" button, such that it doesn't dismount characters (including the one who used the dismount command)?

Also, a quick mount button would be awesome, allowing pawns to mount the closet mountable creature -or- having each pawn mount an animal that they are master over.

Great job!

1. Yes I actually wanted to do that in the last update, but somehow forgot about it. I'll probably release a patch with language updates and if needed bug fixes pretty soon, and I'll make sure this'll be included in that patch.
2. hmm, very good idea. It'll make the mod much more user friendly so I'll likely implement that.  I think I'll limit it to animals pawns are master over, since this has two advantages:
- It prevents any conflicts. It is very likely that when you select a group of pawns, and use "quick mount" for all of them at once, that the'll all go for the same animal. Resolving this is probably a pain to implement. This is of course not an issue when they only go for animals they are master over.
- It gives the player more control over what type of animals pawns should go to compared to the other option.

The only con I see is that pawns that are not master over any animal won't be able to quick-mount.


wwWraith

Quote from: Roolo on January 15, 2018, 02:30:03 AM
Giddy up! Caravan to v18.1.3

- Caravan speed bonus now also influences the "fixed" time needed to traverse world tiles*

*Explanation: In vanilla Rimworld, even if a caravan has the speed of light, it still needs a fixed time to traverse each world tile, which depends on the season, and on the terrain, but not on caravan speed. In winters and in mountainous areas, this fixed time contributes to the largest portion of the travelling time, which made Giddy-up! Caravan ineffective in these situations. However, this has now been solved, as the fixed time now is also influenced by the caravan speed bonuses introduced by Giddy-up!

Does it interfere with Caravan Options and Logistics?
Think about it. Think around it. Perhaps you'll get some new good idea even if it would be completely different from my words.

Ser Kitteh

Any other plans for giddyup? You got combat, caravaning, NPC compatability, yeah that's really all I can think of!

Roolo

Quote from: wwWraith on March 01, 2018, 02:48:15 AM
Quote from: Roolo on January 15, 2018, 02:30:03 AM
Giddy up! Caravan to v18.1.3

- Caravan speed bonus now also influences the "fixed" time needed to traverse world tiles*

*Explanation: In vanilla Rimworld, even if a caravan has the speed of light, it still needs a fixed time to traverse each world tile, which depends on the season, and on the terrain, but not on caravan speed. In winters and in mountainous areas, this fixed time contributes to the largest portion of the travelling time, which made Giddy-up! Caravan ineffective in these situations. However, this has now been solved, as the fixed time now is also influenced by the caravan speed bonuses introduced by Giddy-up!

Does it interfere with Caravan Options and Logistics?

No idea. It certainly wouldn't explode or anything, the worst thing I can see happening is that some changes of caravan speed applied by one mod could be overwritten by the other, but that all depends on how it's implemented in the two mods you refer to. I'd say try it out. You might want to fiddle a bit with load order when doing so.


Quote from: Ser Kitteh on March 01, 2018, 03:09:08 AM
Any other plans for giddyup? You got combat, caravaning, NPC compatability, yeah that's really all I can think of!

Yes definitely. The next mod (Giddy-up! Ride and Roll) will address automatic mounting in non-combat situations. When a pawn wants to go somewhere far, and it would go faster using a mount, it would automatically mount the animal, go to the destination and dismount (or stay mounted when that's suitable for the job, for instance with hunting). I got something rough working already, and it already adds a nice atmosphere to the game, but there are many different jobs that all should be handled slightly differently, so it's still a lot of work to make it not result in really weird situations.

After I finished that mod I'll focus on one mod that's not part of the series, but will play nicely with it. I'd rather not discuss the details to prevent any high expectations (being mysterious here :) ).

And after that I may investigate other future possibilities:
- Non-caravan pack animals (could be separate from Giddy-up!, but at least I'd make it play nicely with it)
- Mechanoid riding
- Skills (for instance charge, stomp etc. )
- Mini add-ons like riding animals for joy or training, maybe a music add-on, and more.

Roolo

Small update:

Giddy-up! Core -> v18.6.1
- When releasing animals, they won't throw off their rider anymore. Only after the pawn dismounts, the animal will start its releasing behaviour.
- Fixed compatibility problem with mods that call Pawn_Healthtracker.MakeDowned during world generation for some reason, which caused the world generation not to work in those (rare) cases.
- Updated Japanese and Russian translations.

Giddy-up! Caravan -> v18.2.1
- Updated Japanese and Russian translations.


Roolo

Small update:
Giddy-up! Caravan -> v18.2.2

- Removed debug messages (sorry for that, I removed them earlier but forgot to compile after that).
- Fixed mod conflict with Animal Logic that caused (non-harmful) errors being thrown when caravans arrived.
- Fixed issue that arose when all NPC mount spots placed are cleared, causing visitors to park their mount at the lower-left corner of the map.

Ser Kitteh

So Idk if this was old because I never had this problem before, but regardless I feel I should report it (if this is indeed a problem with Giddy Up). Basically when I buy an animal from a trader, going to the animal tab I found out said animal still belonged to said trader. I bought a muffalo and to my surprise it dissapeared. It was only until my second purchase that I switch owners to (none) and the animals were mine.

WalkingProblem

Hey Roolo,

I want to check with you, is there any options for modders to force-set specific mounts for a certain faction or group of raiders?

Because I want my modded faction to only ride certain animals.

Is there such an option or setting available?

Roolo

Quote from: Ser Kitteh on March 11, 2018, 08:44:04 AM
So Idk if this was old because I never had this problem before, but regardless I feel I should report it (if this is indeed a problem with Giddy Up). Basically when I buy an animal from a trader, going to the animal tab I found out said animal still belonged to said trader. I bought a muffalo and to my surprise it dissapeared. It was only until my second purchase that I switch owners to (none) and the animals were mine.

Thanks for reporting this. I wouldn't be surprised if the last major update causes this, since I changed the way the caravan dialog is refreshed (to prevent lag), and I think the same dialog is used in trading. I'll look into it.

Quote from: Walking Problem on March 11, 2018, 10:57:51 AM
Hey Roolo,

I want to check with you, is there any options for modders to force-set specific mounts for a certain faction or group of raiders?

Because I want my modded faction to only ride certain animals.

Is there such an option or setting available?

Currently not. But adding it would definitely be nice. I think adding mod options for this will be quite an effort, but I could add xml patch possibilities to begin with. I'll keep you up to date.

WalkingProblem

Quote from: Roolo on March 11, 2018, 11:24:01 AM
Quote from: Walking Problem on March 11, 2018, 10:57:51 AM
Hey Roolo,

I want to check with you, is there any options for modders to force-set specific mounts for a certain faction or group of raiders?

Because I want my modded faction to only ride certain animals.

Is there such an option or setting available?

Currently not. But adding it would definitely be nice. I think adding mod options for this will be quite an effort, but I could add xml patch possibilities to begin with. I'll keep you up to date.

Awesome!!

Because it will be a nice feature for race/faction modders to make the factions more distinct from one another~

Roolo

Quote from: Walking Problem on March 11, 2018, 11:34:45 AM
Quote from: Roolo on March 11, 2018, 11:24:01 AM
Quote from: Walking Problem on March 11, 2018, 10:57:51 AM
Hey Roolo,

I want to check with you, is there any options for modders to force-set specific mounts for a certain faction or group of raiders?

Because I want my modded faction to only ride certain animals.

Is there such an option or setting available?

Currently not. But adding it would definitely be nice. I think adding mod options for this will be quite an effort, but I could add xml patch possibilities to begin with. I'll keep you up to date.

Awesome!!

Because it will be a nice feature for race/faction modders to make the factions more distinct from one another~

Nice to see that you're using my mods for yours :). I just implemented what you requested. I won't release it yet, as there are some other changes in the update that need more testing, and I want to wait with releasing until I finished the next mod in the series, which will be in a few days. However, you can already try out the change by downloading from the master branch on GitHub.

Here's an example XML snippet, showing how you can make sure a certain faction can only use Muffalos and Cougars as mounts, with a 30% chance for each pawn to use a mount. It should be added inside a FactionDef.

<modExtensions>
<li Class="GiddyUpCore.FactionRestrictionsPatch">
<mountChance>30</mountChance>
<wildAnimalWeight>100</wildAnimalWeight> <!--Weights can have any integer value, and the relative fraction to the other weight will determine the change a type of animal spawns-->
<nonWildAnimalWeight>0</nonWildAnimalWeight> <!-- setting this to 0 ensures no default domestic animals are spawned -->
<allowedWildAnimalsCSV>Muffalo,Cougar</allowedWildAnimalsCSV> <!--Use a csv with animal DefNames-->
<allowedNonWildAnimalsCSV></allowedNonWildAnimalsCSV> <!-- only making this empty will imply no restrictions at all, so make sure domesticAnimalWeight is 0 if you don't want any domestic animals-->
</li>
</modExtensions>


Instead of changing your defs directly, you can also create a patch, here's an example (two patches are used to make sure it also works when modExtensions already exists in the FactionDef:

<Patch>
<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="PatchOperationAdd">
<xpath>*/FactionDef[ defName = "Pirate"]/modExtensions</xpath>
<value>
<li Class="GiddyUpCore.FactionRestrictionsPatch">
<mountChance>30</mountChance>
<wildAnimalWeight>100</wildAnimalWeight> <!--Weights can have any integer value, and the relative fraction to the other weight will determine the change a type of animal spawns-->
<nonWildAnimalWeight>0</nonWildAnimalWeight> <!-- setting this to 0 ensures no default domestic animals are spawned -->
<allowedWildAnimalsCSV>Muffalo,Cougar</allowedWildAnimalsCSV> <!--Use a csv with animal DefNames-->
<allowedNonWildAnimalsCSV></allowedNonWildAnimalsCSV> <!-- only making this empty will imply no restrictions at all, so make sure domesticAnimalWeight is 0 if you don't want any domestic animals-->
</li>
</value>
</li>
</operations>
</Operation>

<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="PatchOperationAdd">
<xpath>*/FactionDef[ defName = "Pirate" and not(DefModExtension)]</xpath>
<value>
<modExtensions>
<li Class="GiddyUpCore.FactionRestrictionsPatch">
<mountChance>30</mountChance>
<wildAnimalWeight>100</wildAnimalWeight> <!--Weights can have any integer value, and the relative fraction to the other weight will determine the change a type of animal spawns-->
<domesticAnimalWeight>0</domesticAnimalWeight> <!-- setting this to 0 ensures no default domestic animals are spawned -->
<allowedWildAnimalsCSV>Muffalo,Cougar</allowedWildAnimalsCSV> <!--Use a csv with animal DefNames-->
<allowedDomesticAnimalsCSV>""</allowedDomesticAnimalsCSV> <!-- only making this empty will imply no restrictions at all, so make sure domesticAnimalWeight is 0 if you don't want any domestic animals-->
</li>
</modExtensions>
</value>
</li>
</operations>
</Operation>
</Patch>


Please let me know if you need anything else.

Edit: renamed domestic to nonWild in the XML.

WalkingProblem

Quote from: Roolo on March 11, 2018, 03:09:08 PM
Nice to see that you're using my mods for yours :). I just implemented what you requested. I won't release it yet, as there are some other changes in the update that need more testing, and I want to wait with releasing until I finished the next mod in the series, which will be in a few days. However, you can already try out the change by downloading from the master branch on GitHub.

Here's an example XML snippet, showing how you can make sure a certain faction can only use Muffalos and Cougars as mounts, with a 30% chance for each pawn to use a mount. It should be added inside a FactionDef.

<modExtensions>
<li Class="GiddyUpCore.FactionRestrictionsPatch">
<mountChance>30</mountChance>
<wildAnimalWeight>100</wildAnimalWeight> <!--Weights can have any integer value, and the relative fraction to the other weight will determine the change a type of animal spawns-->
<domesticAnimalWeight>0</domesticAnimalWeight> <!-- setting this to 0 ensures no default domestic animals are spawned -->
<allowedWildAnimalsCSV>Muffalo,Cougar</allowedWildAnimalsCSV> <!--Use a csv with animal DefNames-->
<allowedDomesticAnimalsCSV></allowedDomesticAnimalsCSV> <!-- only making this empty will imply no restrictions at all, so make sure domesticAnimalWeight is 0 if you don't want any domestic animals-->
</li>
</modExtensions>


Instead of changing your defs directly, you can also create a patch, here's an example (two patches are used to make sure it also works when modExtensions already exists in the FactionDef:

<Patch>
<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="PatchOperationAdd">
<xpath>*/FactionDef[ defName = "Pirate"]/modExtensions</xpath>
<value>
<li Class="GiddyUpCore.FactionRestrictionsPatch">
<mountChance>30</mountChance>
<wildAnimalWeight>100</wildAnimalWeight> <!--Weights can have any integer value, and the relative fraction to the other weight will determine the change a type of animal spawns-->
<domesticAnimalWeight>0</domesticAnimalWeight> <!-- setting this to 0 ensures no default domestic animals are spawned -->
<allowedWildAnimalsCSV>Muffalo,Cougar</allowedWildAnimalsCSV> <!--Use a csv with animal DefNames-->
<allowedDomesticAnimalsCSV></allowedDomesticAnimalsCSV> <!-- only making this empty will imply no restrictions at all, so make sure domesticAnimalWeight is 0 if you don't want any domestic animals-->
</li>
</value>
</li>
</operations>
</Operation>

<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="PatchOperationAdd">
<xpath>*/FactionDef[ defName = "Pirate" and not(DefModExtension)]</xpath>
<value>
<modExtensions>
<li Class="GiddyUpCore.FactionRestrictionsPatch">
<mountChance>30</mountChance>
<wildAnimalWeight>100</wildAnimalWeight> <!--Weights can have any integer value, and the relative fraction to the other weight will determine the change a type of animal spawns-->
<domesticAnimalWeight>0</domesticAnimalWeight> <!-- setting this to 0 ensures no default domestic animals are spawned -->
<allowedWildAnimalsCSV>Muffalo,Cougar</allowedWildAnimalsCSV> <!--Use a csv with animal DefNames-->
<allowedDomesticAnimalsCSV>""</allowedDomesticAnimalsCSV> <!-- only making this empty will imply no restrictions at all, so make sure domesticAnimalWeight is 0 if you don't want any domestic animals-->
</li>
</modExtensions>
</value>
</li>
</operations>
</Operation>
</Patch>


Please let me know if you need anything else.

Awesomeness!

Yeah, GiddyUp is like the dream mod that everyone is waiting for for ages...

I just made a Animal Weapons Framework (allows animal to carry weapons; I havent launch it yet) and created autonomous vehicles with it. The vehicles + my animal weapon framework + giddyup + run and gun = super awesomeness~ LOL

So the reason I asked for the feature, because I want to make my Walkblem soldiers drive the armored car or hoverbike to raid or visit the players~



Roolo

Quote from: Walking Problem on March 12, 2018, 06:20:58 AM

[...]

Awesomeness!

Yeah, GiddyUp is like the dream mod that everyone is waiting for for ages...

I just made a Animal Weapons Framework (allows animal to carry weapons; I havent launch it yet) and created autonomous vehicles with it. The vehicles + my animal weapon framework + giddyup + run and gun = super awesomeness~ LOL

So the reason I asked for the feature, because I want to make my Walkblem soldiers drive the armored car or hoverbike to raid or visit the players~




Thanks! I have to say, those vehicles look amazing. I'm looking forward to seeing them in action.

Ser Kitteh