• The forum has been updated. For an explanation of some of the changes, head over here.

Full Auto

Currently viewing this thread:

wzWire

Recruit
Any idea on making weapons full auto? The one open source full auto script has a lot of errors considering it was made about 10 years ago and anyone asking about errors is not replied to, so is there an updated way of making weapons full auto for a mod?
 
I was thinking of making a Chu-Ku-No unit (Like in AOE) for a faction I'm creating but I don't really know how to go about doing that other thank editing weapon speed for a crossbow. I'd like to get meshes and stuff for it though. The whole 9 yards ya know? An actual weapon mod sort of similar to the deployable pavaises (sp?). 
 

dcmmivan123

Recruit
I was thinking of making a Chu-Ku-No unit (Like in AOE) for a faction I'm creating but I don't really know how to go about doing that other thank editing weapon speed for a crossbow. I'd like to get meshes and stuff for it though. The whole 9 yards ya know? An actual weapon mod sort of similar to the deployable pavaises (sp?).
you mean set crossbow ammo to higher than 1 with morghs editor? it only make the crossbow go semi-auto

i also want to make auto weapon but so little information about how to make it except this old post (https://forums.taleworlds.com/index.php?threads/wip-auto-firing-weapons-mod.144557/) that doesn't explain much about how to mod it. since im not a modder. all i do is copy their way and doesn't know what code do what:xf-frown:
 
Well it all depends on what you need the auto code for. If you are incapable of using the M&B Scripting language then there is no room for explaining what you can/should do. I can only hint you in the right direction by looking at Bear Force II Source Code that should be semi-public (even the outdated one).
You'll have to look in module_scripts module_mission_templates module_constants and header_common. You need to make sure that all related scripts are in the mod and not too much. You need to be able to thoroughly check every piece of information in the scripts that relate to the guns and delete each bit and rewrite that is directly associated with Bear Force (which you don't use or have).

Based on the text above you should be able to get that running at any point in the game. I even did like a mock version with example files of source code. But first I would like you to atleast be able to comprehend how that code works or you won't be able to use it properly and probably destroy stuff idk.
 

dcmmivan123

Recruit
can you show me the auto code in each part(scripts,templates,constants,common) of the code and explain what function do they do? btw where can i learn more about "M&B Scripting language" you know i don't want to blindfully copy paste other ppl code and doesnt know why they are there:xf-cry: .i have python 2.7.3,module system,. please help
 
Okay I can hint you into directions to understand something
module_constants:
We can give agents, players, scene objects items etc. some variables. Changeable with x_set_slot where x is player, agent... whatever, get_slot and slot_eq, basically you can store that item_shooting_speed, accuracy, reload_time, shooting_animation, aim_animation etc.
header_common:
A place where we define basically numbers 0 - 127 but declare them as names so you don't get confused as easily. Like look at the file and yo see that each word has a value 1-127. It is not used to be a changeable value or to store something but it is rather just used in scripts to make something more read-able.
module_mission_templates:
Here we basically store all game-checks, this is the "call" area where we say each second, each_milisecond, on being hit, on death etc. stuff happens. Make sure to understand that there is a BIG difference on what you can do client-side and server-side IF you do a multiplayer module. ALWAYS make sure to send server-required values with send_int commands. Also make sure not to use 0 for calls on a server-side script or your server will die very quickly. Also learn that you can only use this with timed delay if you can accurately script it like that.

NEVER use Global Variables if you don't know how to assign them properly and how to reset them. Even more important for multiplayer.
module_scripts:
This place is used for storing big coding operations often indicated by the script's name. You use script_params to send the information required on the script when calling them in module_mission_templates (or somewhere else, even in module_scripts itself) and lessen the code-blocks you create each time you do a specific thing)

There are also some hardcoded areas in this file that are very important for multiplayer modules like game_receive_network_message which is the ONLY area in the whole module code to successfully send information between server and client.
In our case we NEED this area very importantly to do the shooting etc. cause you cannot fire missiles that work in multiplayer without this.
I know this probably isn't the best instructions I can give you, but you should be able to atleast figure out these specifics.
There is tons of more that I could have written down but I think that is enough intel you need to properly understand where you can look at for specific things.
 
Top Bottom