OSP Code BareBones ModuleSystem (1.134)

Users who are viewing this thread

Lav said:
Caba`drin said:
Without making these merchant changes, however, your merchants will cease to stock helmets, gloves, and a couple other item types as the way the engine handles some of the operations has changed and the content of the script/trigger code changed slightly to accommodate.
1. Took 1.143 module system.
2. Moved all code from script_refresh_whatever scripts into their respective triggers.
3. Commented out all calls to script_refresh_whatever scripts in the code.
4. Started a new game.
5. Cheated a million bucks.
6. Bought out all arrows, bolts, helmets and gloves in Praven.
7. Stayed in the inn for a week (triggers are set every 168 hours == 1 week).
7.5. Had enough time to think about my own stupidity for not changing triggers to a shorter period. :wink:
8. Went to marketplace.
7. Enjoyed the sight of successfully refreshed arrows, bolts, helmets and gloves. :smile:

In short: there is no real need to refresh merchants through scripts. Triggers worked perfectly fine in 1.134 and they work perfectly fine in 1.143. I don't know what happened in 1.142, but apparently it was not engine changes but simple and pure programmers' mistakes. :smile:

Perhaps I'm making it up, but your responses frequently seem to assume I make comments without testing things or am otherwise not speaking from experience; I find this apparent assumption confusing.

Caba`drin said:
So, I've done a few more "let the game simulate itself" tests...with some disappointing results.
It would appear that the fix for bolts/arrows/gauntlets/boots works for Native (with old save games or new, running Native 1.143, these item types do not disappear). BUT, this is not the case for mods, where the changes in the production system (and the relationship between the .exe and the Module System it would seem on these issues) still result in these particular items disappearing. This means for the equipment to not disappear in non-Native mods, the mods will need to make the appropriate Module System changes and port to 1.143.

Of course whether or not the the code held in script_refresh_whatever is in module_scripts and called by a trigger or if it is directly in module_triggers doesn't matter to the engine and will result in the same outcome.

The 1.143 code in script_refresh_whatever is not the same as the code in 1.134 triggers, however. The new code adds (troop_clear_inventory, ":cur_merchant"), with every call. Somehow without this, there are issues (see all the complaints with the release of version 1.142 or the attempts of people to run 1.134 mods on 1.142/3). If you use the 1.134 triggers code on the 1.143 engine and let the game simulate for 2 months or so, there will be 0 bolts, gloves, and helmets with the merchants and they will never reappear. I and others have replicated this numerous times.
 
Caba`drin said:
Perhaps I'm making it up, but your responses frequently seem to assume I make comments without testing things or am otherwise not speaking from experience; I find this apparent assumption confusing.
I'm sorry, this is definitely not intentional.

Caba`drin said:
The 1.143 code in script_refresh_whatever is not the same as the code in 1.134 triggers, however. The new code adds (troop_clear_inventory, ":cur_merchant"), with every call. Somehow without this, there are issues (see all the complaints with the release of version 1.142 or the attempts of people to run 1.134 mods on 1.142/3). If you use the 1.134 triggers code on the 1.143 engine and let the game simulate for 2 months or so, there will be 0 bolts, gloves, and helmets with the merchants and they will never reappear. I and others have replicated this numerous times.
Well, that's right, they did change the engine somewhat which caused the old scripts to malfunction and didn't fix the scripts to match the engine. And then they went and fixed the scripts. However, all those changes are of absolutely zero relevance to the BareBones module because both 1.134 and 1.143, when stripped to BareBones, become absolutely identical (save for header_operations). That's the point I was making and defending (apparently against a non-existent challenge as you meant something else entirely :smile:).

Well, let's just say one more time that I'm sorry - I sometimes write without thinking things properly when I have my head full of other stuff.
 
One annoying problem with BareBones: it removes too many items from the module_items.py file. Meanwhile, many items are actually used in the Native scenes.

With that in mind, I wrote a small script to retrieve the full list of items used in the Native maps. There's a total of 312 items which have been used at least once. So if someone is planning to use BareBones in combination with the Native scenes, he will want to copy declarations for the following items from the Native source code:

itm_ale
itm_ankle_boots
itm_apples
itm_arabian_horse_a
itm_arabian_horse_b
itm_arabian_sword_c
itm_arena_axe
itm_arena_helmet_blue
itm_arena_helmet_green
itm_arena_helmet_red
itm_arena_helmet_yellow
itm_arena_lance
itm_arena_shield_blue
itm_arena_shield_green
itm_arming_cap
itm_arming_sword
itm_arrows
itm_ashwood_pike
itm_awlpike
itm_awlpike_long
itm_axe
itm_bamboo_spear
itm_barbed_arrows
itm_bardiche
itm_bascinet
itm_bascinet_2
itm_bascinet_3
itm_bastard_sword
itm_bastard_sword_a
itm_bastard_sword_b
itm_battle_axe
itm_battle_fork
itm_battle_shield
itm_bec_de_corbin_a
itm_black_greaves
itm_black_helmet
itm_black_hood
itm_blue_hose
itm_blue_tourney_helmet
itm_boar_spear
itm_bodkin_arrows
itm_bolts
itm_book_engineering
itm_book_intelligence
itm_book_leadership
itm_book_persuasion
itm_book_surgery_reference
itm_book_tactics
itm_book_trade
itm_book_training_reference
itm_book_weapon_mastery
itm_book_wound_treatment_reference
itm_bread
itm_bride_shoes
itm_broadsword
itm_butchering_knife
itm_butter
itm_byzantion_helmet_a
itm_cattle_meat
itm_charger
itm_cheese
itm_cleaver
itm_club
itm_club_with_spike_head
itm_courser
itm_crossbow
itm_cudgel
itm_dagger
itm_desert_turban
itm_double_axe
itm_double_sided_lance
itm_dried_meat
itm_falchion
itm_felt_hat
itm_felt_hat_b
itm_felt_steppe_cap
itm_female_hood
itm_fighting_axe
itm_fighting_pick
itm_flat_topped_helmet
itm_flour
itm_footman_helmet
itm_full_helm
itm_fur_covered_shield
itm_fur_hat
itm_furs
itm_gauntlets
itm_glaive
itm_gold_tourney_helmet
itm_grain
itm_great_axe
itm_great_bardiche
itm_great_helmet
itm_great_lance
itm_great_sword
itm_guard_helmet
itm_hafted_blade_b
itm_hammer
itm_hand_axe
itm_hatchet
itm_headcloth
itm_heater_shield
itm_heavy_crossbow
itm_heavy_throwing_axes
itm_heavy_throwing_axes_melee
itm_helmet_with_neckguard
itm_hide_boots
itm_hide_covered_round_shield
itm_honey
itm_horse_meat
itm_hunter
itm_hunter_boots
itm_hunting_bow
itm_hunting_crossbow
itm_iron
itm_iron_greaves
itm_iron_staff
itm_items_end
itm_jarid
itm_javelin
itm_jousting_lance
itm_kettle_hat
itm_khergit_bow
itm_khergit_cavalry_helmet
itm_khergit_guard_boots
itm_khergit_guard_helmet
itm_khergit_leather_boots
itm_khergit_sword
itm_kite_shield_
itm_lamellar_gauntlets
itm_large_shield
itm_leather_boots
itm_leather_cap
itm_leather_covered_round_shield
itm_leather_gloves
itm_leather_steppe_cap_a
itm_leather_warrior_cap
itm_leatherwork
itm_light_crossbow
itm_light_lance
itm_light_throwing_axes
itm_linen
itm_long_axe
itm_long_axe_c_alt
itm_long_bow
itm_lute
itm_mace_2
itm_mace_4
itm_magyar_helmet_a
itm_mail_boots
itm_mail_chausses
itm_mail_coif
itm_mail_mittens
itm_maul
itm_military_fork
itm_military_pick
itm_morningstar
itm_nasal_helmet
itm_nomad_boots
itm_nomad_bow
itm_nomad_cap
itm_nomad_shield
itm_nordic_fighter_helmet
itm_nordic_helmet
itm_nordic_shield
itm_nordic_sword
itm_norman_helmet
itm_norman_shield_1
itm_norman_shield_2
itm_norman_shield_3
itm_norman_shield_5
itm_norman_shield_6
itm_norman_shield_7
itm_norman_shield_8
itm_oil
itm_one_handed_battle_axe_a
itm_one_handed_battle_axe_c
itm_one_handed_war_axe
itm_one_handed_war_axe_a
itm_one_handed_war_axe_b
itm_padded_coif
itm_pickaxe
itm_pitch_fork
itm_plate_boots
itm_plate_covered_round_shield
itm_pork
itm_pottery
itm_practice_arrows
itm_practice_arrows_2
itm_practice_axe
itm_practice_bolts
itm_practice_bow
itm_practice_bow_2
itm_practice_crossbow
itm_practice_horse
itm_practice_javelin
itm_practice_lance
itm_practice_shield
itm_practice_staff
itm_practice_throwing_daggers
itm_quest_ale
itm_quest_wine
itm_raw_dyes
itm_raw_leather
itm_raw_silk
itm_red_tourney_helmet
itm_round_shield
itm_rus_helmet_a
itm_saddle_horse
itm_salt
itm_sarranid_axe_a
itm_sarranid_axe_b
itm_sarranid_boots_a
itm_sarranid_boots_b
itm_sarranid_mace_1
itm_sausages
itm_scale_gauntlets
itm_scimitar
itm_scimitar_b
itm_scythe
itm_segmented_helmet
itm_shield_heater_c
itm_shield_heater_d
itm_shield_round_e
itm_short_bow
itm_shortened_military_scythe
itm_shortened_spear
itm_sickle
itm_siege_supply
itm_skullcap
itm_sledgehammer
itm_smoked_fish
itm_sniper_crossbow
itm_spear
itm_spice
itm_spiked_club
itm_spiked_mace
itm_splinted_greaves
itm_splinted_leather_greaves
itm_staff
itm_steel_shield
itm_steppe_helmet_white
itm_steppe_horse
itm_straw_hat
itm_strong_bow
itm_sumpter_horse
itm_sword
itm_sword_khergit_1
itm_sword_khergit_2
itm_sword_khergit_3
itm_sword_khergit_4
itm_sword_medieval_a
itm_sword_medieval_a_long
itm_sword_medieval_b
itm_sword_medieval_c
itm_sword_medieval_c_long
itm_sword_medieval_c_small
itm_sword_of_war
itm_sword_two_handed_a
itm_sword_two_handed_b
itm_sword_viking_2
itm_sword_viking_2_small
itm_sword_viking_3
itm_sword_viking_3_small
itm_tab_shield_heater_a
itm_tab_shield_heater_c
itm_tab_shield_heater_cav_b
itm_tab_shield_kite_a
itm_tab_shield_pavise_c
itm_tab_shield_small_round_b
itm_tab_shield_small_round_c
itm_throwing_axes
itm_throwing_axes_melee
itm_throwing_knives
itm_throwing_spear_melee
itm_tools
itm_torch
itm_tourney_helm_white
itm_turret_hat_green
itm_tutorial_arrows
itm_tutorial_axe
itm_tutorial_battle_axe
itm_tutorial_bolts
itm_tutorial_club
itm_tutorial_crossbow
itm_tutorial_saddle_horse
itm_tutorial_shield
itm_tutorial_staff
itm_tutorial_sword
itm_two_handed_axe
itm_two_handed_battle_axe_2
itm_two_handed_cleaver
itm_vaegir_mask
itm_vaegir_war_helmet
itm_velvet
itm_voulge
itm_war_axe
itm_war_bow
itm_war_spear
itm_warhammer
itm_warhorse
itm_wine
itm_winged_great_helmet
itm_winged_mace
itm_wooden_shield
itm_wooden_stick
itm_wool
itm_wool_cloth
itm_woolen_cap
itm_woolen_hood
itm_woolen_hose
itm_wrapping_boots
 
Back
Top Bottom