Author Topic: Modding VC: basic tutorials and Q&A thread  (Read 58948 times)

0 Members and 1 Guest are viewing this topic.

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #30 on: April 02, 2016, 07:52:24 PM »
I'm presuming he has a bunch of the Norse veteran archers, and would like to put them in front if the enemy manages to get close to them. Only reason I can think you'd want this.

But like I mentioned the script was created for melee troops, not archers. The stats are different, so if the game tries to apply the same logic it won't have the result you would expect, even worse if someone changes the troop tree/stats.

So to enable "RANKS" the modder will need to go deeper and first understand how it works, why it works that way, and HOW to adapt that to other types of units (like archers), or create a new formations like "archers ranks" and apply the new rules for it.

TLDR: things are not that simple when you are messing with AI decisions  :)

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #31 on: April 07, 2016, 03:58:07 AM »
Update: (Miniguide, coder section)


Quote
Sublime API: do you want to type code 10x as fast? Do you want inline help with operations? Then check out this link https://forums.taleworlds.com/index.php/topic,320675.0.html


WRECK: alternative compiler that will let you do very cool stuff with your code. Visit the official thread to learn more:
https://forums.taleworlds.com/index.php/topic,325102.0.html


Lav's version of modules (for native, 1.166): check out the header_operations.py and header_triggers.py. You can actually read and understand those numbers, instead of guessing what they do (Lav's has added comments to explain and organize that stuff!)
http://forums.taleworlds.com/index.php/topic,324874.0.html


Sublime+WRECK+Lav's header_operations.py = much happier modder

CrazyOldTeenager

  • Recruit
  • *
    • View Profile
  • Faction: Khergit
Re: Q&A : modding VC
« Reply #32 on: April 13, 2016, 07:34:49 PM »
Hi everybody, CrazyOldTeenager here. I was directed here by a moderator as I was told my question was more suitable for this forum rather than the support section.

I'm trying to incorporate the sling from Viking Conquest into a personal mod of mine, but I've come across the old problem where the sling doesn't fire and just keeps spinning around for a while after the attack button has been released. It eventually does fire, but only after several seconds, making it difficult to land accurate shots. For further description of the problem, visit this link: https://forums.taleworlds.com/index.php?topic=320434.0 I've obtained the original animation and copied the relevant code from module_animations.py, but the issue persists. How was this bug fixed before?   

url=http://forums.taleworlds.com/index.php/topic,248986.0.html][/url]

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #33 on: April 13, 2016, 08:21:14 PM »
sling doesn't fire and just keeps spinning around

1. Make sure you are playing WB 1.168
2. Make sure you are using code from VC MS 2.023
3. Make sure you are copying the latest resources (BRF for animations).
4. Check the slingers code on module_items.py
5. Check the animation code on module_animations.py
6. Check your module.ini for these flags:

Code: [Select]
shorter_pistol_aiming = 1
apply_all_ammo_damage_modifiers = 1
« Last Edit: April 13, 2016, 08:25:05 PM by kalarhan »

CrazyOldTeenager

  • Recruit
  • *
    • View Profile
  • Faction: Khergit
Re: Q&A : modding VC
« Reply #34 on: April 14, 2016, 01:58:32 PM »
Thank you very much, good sir! My slings work perfectly now, there is absolutely no delay when firing.

That being said, there is one other question I would like to ask...is it possible to remove the reload function for the sling, so that operates similarly to a javelin in that you can just keep firing until you're out of ammo without having to worry about the reloading process?
url=http://forums.taleworlds.com/index.php/topic,248986.0.html][/url]

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #35 on: April 14, 2016, 02:47:22 PM »
is it possible to remove the reload function

try increasing the max_ammo of the weapon, that way the game thinks you have "that many" ready to fire (like a revolver with 6 bullets instead of a gun with 1)

Code: [Select]
max_ammo(1)
do that on module_items.py for your slingers

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #36 on: April 14, 2016, 09:12:19 PM »
2. Only Viking Conquest Mod Source may be used in non-Viking Conquest mods. Do not use Viking Conquest binary files such as textures, models, animations, sounds, music, and scenes.

I am wanting to make a small mod (because I am one man) with additional features, new content, OSP's, ....

Imagine that you are creating a Medieval Japan mod. All you want are the scripts for decapitation. You can use them, as long you add the DLC and BWStudios on your credits. It does not need to be a submod.

If you use any of the resources/binaries: any texture, music, sounds, BRF, animation, map, ... you need to turn your game into a submod. That means you will need to post it on this forum section (not the warband one), your players will be required to own the DLC to play your mod, but you are free to change stuff. Make it a total conversion, or a small feature addition. It does not matter. It is a submod of VC, the rest is up to you. You also need to add credits for the main game (VC DLC). Thats it.
« Last Edit: April 14, 2016, 09:14:20 PM by kalarhan »

Sorenerv

  • Regular
  • *
  • Purus Perfaro Perago "Legit to the End"
    • View Profile
  • Faction: Vaegir
  • WBVC
Re: Q&A : modding VC
« Reply #37 on: April 14, 2016, 09:25:08 PM »
 :D :D :D :D :D :D :D :D :D :D :D

Thank you!! I was really worried. I have already started on my mod and have about a hard solid week into it. Glad the heart didn't sink there! haha. Making my mod is something I really want to do! I'm glad I'll be able to make scenes or do whatever. Great news!! Sorry I deleted my prior post I was not sure where it should go.
« Last Edit: April 15, 2016, 01:52:53 AM by Sorenerv »

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #38 on: April 20, 2016, 01:29:19 AM »
Question: How to skip character creation on a new game?

answered here  :arrow: https://forums.taleworlds.com/index.php/topic,349118.msg8377882.html#msg8377882

Example of use: I have a mod that follows this story

1) Click new game
2) You are inside a scene/instance for a battle (no previous menus, character creation, questions, history, etc)
3) Battle is scripted with some events (no spoilers...)
4) After battle is over you are sent to the worldmap to see how factions are distributed and to start to get your grips on the current stage of the story
5) 1 ingame hour later (player moves anywhere, as showed on the tutorial popup) game shows up some UI to tell the story (similar to VC)
6) Then it finally takes you to character creation (you can then pick a name, face and stats)



Example 2: just skip all the blah blah when doing TESTS. A button on the first menu allows you to skip it all, so you go directly to the worldmap. You will probably have to create hundreds of savegames that are only useful for a few seconds/minutes to collect data, so there ya go, shortcut!  :mrgreen:

Dodgy

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: Q&A : modding VC
« Reply #39 on: May 18, 2016, 06:06:37 PM »
ehy kalarhan, posting here following your advice on the other topic in the bug section.

here is the incriminated code from the 2.023 source module:

Code: [Select]
[anyone, "event_triggered", [
    ],
    "Sorry, I must take care of some business, but look me up again later... (companions limited to ten in party)", "close_window", [
      (troop_set_slot, "$map_talk_troop", slot_troop_playerparty_history, pp_history_quit),
      (call_script, "script_retire_companion", "$map_talk_troop", 150),
  ]],

I could either take out the whole thing or just the bits that make the companion actually leave, but I am afraid it might be related to some specific events later in the story campaign that could actually bug my save later on, because the "event_triggered" part is generic, I found it other places as well, I have no idea about its relative importance or lack thereof.
I have also already modded my game by making some tweaks to change things to my liking, for example I completely removed all the code related to companions complaining and whining at each other (after you played warband/mods/dlcs enough times you just grow tired of it :D ), so I am also afraid as to how related some interactions could be.

And since I discovered this topic, later on I am also going to post some more doubts/questions I had that were giving me compilation errors I could not understand the reasons why as I thought it was all correct, syntax included.

Meanwhile, cheers and thanks

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #40 on: May 18, 2016, 06:24:58 PM »
here is the incriminated code from the 2.023 source module

this dialog should not be there without a condition in the first place, so devs will probably move this feature to a event-chain.

You yourself reported a bug. Having only two companions the game complained about you having more than 10  :mrgreen:

Remove it (disable it), then keep a eye for next patch source.

The other point on this is that affects temporary retirement of a companion. You already removed complains/etc from them, so this should not be used on your tweaked version. Companions can't get mad on you to the point they decide to leave.

TLDR: remove it

Dodgy

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: Q&A : modding VC
« Reply #41 on: May 21, 2016, 05:03:38 PM »
Hello,

First of all, I am no coder and a total beginner to modding, so what I am about to ask is probably a stupid/easy question.

I was wondering, is it possible, and if so how, to create new dialogue "status points", I wouldn't even know how to call them, I refer to things like "lord_talk" and "lord_pretalk".

If I simply add one in the dialogue module, it won't work, the game won't recognize it as existing, so I would like to understand how to create a complex dialogue tree that will allow me to do something like "check for this, if conditions are X go to "talked to char a" if conditions are Y "talked to char b" and if the conditions are Z go to "talked to char c", or to make completely sure without having to go around it with lots of conditions and extra copies of the same dialogues that it will apply only to specific characters/situations.

So far I have only been able to create/modify dialogues using the existing "status points" of the game, but I could have made my current mod much better and added extra layers of complexity to some of the stuff if I could create as many of these "status points" as needed.

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #42 on: May 21, 2016, 05:11:33 PM »
to create new dialogue

check this tutorial https://forums.taleworlds.com/index.php/topic,12733.0.html.

If you have more generic questions on dialogs you can visit the Q&A thread in the Forge, several modders post there helping with doubts https://forums.taleworlds.com/index.php/topic,6575.0.html

If you have specific questions on VC modules feel free to post here too  :)

Dodgy

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: Q&A : modding VC
« Reply #43 on: May 21, 2016, 05:38:20 PM »
Thanks for the answer kalarhan.

I did read that tutorial, however the examples provided refer to a single npc starting the conversation.

What I need is something that applies to a whole category, like all the lords, so new dialogue applying to all of them and leading to a specific branch of the dialogue tree.
The problem is that I can't manage to create new branch just from the dialogue module, I have the feeling they need to be created somewhere else as well, but I can't manage to understand where.
I'll try to post on the other section of the forum as well, thanks again.

kalarhan

  • Python Saint
  • Count
  • *
  • Use Q&A thread, not a PM :)
    • View Profile
  • Faction: Neutral
  • WBNWVCWF&S
Re: Q&A : modding VC
« Reply #44 on: May 21, 2016, 06:18:56 PM »
I'll try to post on the other section of the forum as well, thanks again.

Np. What you need is to use the condition part of the dialog, and you also have the repeat function if you are creating options for you (the player)

Code: [Select]
   [anyone|plyr|repeat_for_troops,"award_fief_to_vassal",
   [ 
     (store_repeat_object, ":troop_no"),
     (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
     (neq, "trp_player", ":troop_no"),