Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
Does pf_quest_party mean the party is ignored by the AI?


Also what does this do exactly?  pf_auto_remove_in_town



Thanks.
 
Hi all,

I have recently noticed that some Complied Python Files hang around in the Module System folder even though building module had no errors, is this something to be worried about / is there something I'm missing?

Usually these seem to only appear if there was an error when building module, but they then disappear when this error is fixed.

Thanks!
 
Radi Jaeger 说:
Hi all,

I have recently noticed that some Complied Python Files hang around in the Module System folder even though building module had no errors, is this something to be worried about / is there something I'm missing?

Usually these seem to only appear if there was an error when building module, but they then disappear when this error is fixed.

Thanks!

Trash files are  .pyc and you can safely remove them. If its some other type then something weird happens.
 
Radi Jaeger 说:
I have recently noticed that some Complied Python Files hang around in the Module System folder even though building module had no errors, is this something to be worried about / is there something I'm missing?

you can delete the *.pyc files. You could even force Python to not generate them. But if they are still there after you delete them (next time you compile), you should double check for errors.



KnightV 说:
How to add new books .What may i do and were?
Books are a item. Check module_items.py and create new ones inside the original range. Then check the script that gives bonus/etc for a book. You may also add new cover for your book (texture), so it has that unique look on the inventory.

插入代码块:
reference_books_begin = "itm_book_wound_treatment_reference"
reference_books_end   = trade_goods_begin
readable_books_begin = "itm_book_tactics"
readable_books_end   = reference_books_begin
books_begin = readable_books_begin
books_end = reference_books_end

Pay attention to the comments
插入代码块:
#This book must be at the beginning of readable books
 ["book_tactics","De Re Militari", [("book_a",0)], itp_type_book, 0, 4000,weight(2)|abundance(100),imodbits_none],
 ["book_persuasion","Rhetorica ad Herennium", [("book_b",0)], itp_type_book, 0, 5000,weight(2)|abundance(100),imodbits_none],
 ["book_leadership","The Life of Alixenus the Great", [("book_d",0)], itp_type_book, 0, 4200,weight(2)|abundance(100),imodbits_none],
 ["book_intelligence","Essays on Logic", [("book_e",0)], itp_type_book, 0, 2900,weight(2)|abundance(100),imodbits_none],
 ["book_trade","A Treatise on the Value of Things", [("book_f",0)], itp_type_book, 0, 3100,weight(2)|abundance(100),imodbits_none],
 ["book_weapon_mastery", "On the Art of Fighting with Swords", [("book_d",0)], itp_type_book, 0, 4200,weight(2)|abundance(100),imodbits_none],
 ["book_engineering","Method of Mechanical Theorems", [("book_open",0)], itp_type_book, 0, 4000,weight(2)|abundance(100),imodbits_none],

#Reference books
#This book must be at the beginning of reference books
 ["book_wound_treatment_reference","The Book of Healing", [("book_c",0)], itp_type_book, 0, 3500,weight(2)|abundance(100),imodbits_none],
 ["book_training_reference","Manual of Arms", [("book_open",0)], itp_type_book, 0, 3500,weight(2)|abundance(100),imodbits_none],
 ["book_surgery_reference","The Great Book of Surgery", [("book_c",0)], itp_type_book, 0, 3500,weight(2)|abundance(100),imodbits_none],

do a full text search for a similar book to locate the scripts/triggers, then add your new one in there (so you can raise skills, give stats bonus, etc).



produno 说:
Does pf_quest_party mean the party is ignored by the AI?


Also what does this do exactly?  pf_auto_remove_in_town

yeap, pf_quest_party = 1 is to tell the game you are doing a quest, you can set it back to 0 if the quest gets canceled. At least that is the idea, as it was used for the tutorial/new game quest chain.

pf_auto_remove_in_town => think of a party travelling to somewhere that will disband. A caravan, a group of survivors after a battle (running away to a secure location/routed), a messenger, etc
 
EmielRegis? 说:
Radi Jaeger 说:
Hi all,

I have recently noticed that some Complied Python Files hang around in the Module System folder even though building module had no errors, is this something to be worried about / is there something I'm missing?

Usually these seem to only appear if there was an error when building module, but they then disappear when this error is fixed.

Thanks!

Trash files are  .pyc and you can safely remove them. If its some other type then something weird happens.
What about my modsys check in ,Emiel?Why you ignore me?Or i missed some thing?
 
KnightV 说:
What about my modsys check in ,Emiel?Why you ignore me?Or i missed some thing?

suggestion: if you want to talk to someone directly you can use the PM function in the forum. PM = private/personal message
 
kalarhan 说:
KnightV 说:
What about my modsys check in ,Emiel?Why you ignore me?Or i missed some thing?

suggestion: if you want to talk to someone directly you can use the PM function in the forum. PM = private/personal message
where i can find scripts connected with books and how add new scripts.Where they are&&
 
@KnightV, kalarhan answered your question above:
do a full text search for a similar book to locate the scripts/triggers, then add your new one in there (so you can raise skills, give stats bonus, etc).

Try to use the 'find in all files' function in whatever editor you are using to find what you are looking for.



Not really a question, but more of something I recently found out, so it might be helpful for others:

In Mission Templates, the list of spawn records has an entry point associated to it:

插入代码块:
    # Attacker initial spawn point  
     (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,4,[]), 
     (1,mtef_attackers|mtef_team_3,af_override_horse,aif_start_alarmed,2,[]), 
     (2,mtef_attackers|mtef_team_5,af_override_horse,aif_start_alarmed,2,[]),

     # Initial defender spawn point
     (15,mtef_defenders|mtef_team_0|mtef_infantry_first,af_override_horse,aif_start_alarmed,4,[]),
     (16,mtef_defenders|mtef_team_2|mtef_infantry_first,af_override_horse,aif_start_alarmed,2,[]),
     (17,mtef_defenders|mtef_team_4|mtef_infantry_first,af_override_horse,aif_start_alarmed,2,[]),

The operation (add_reinforcements_to_entry) uses the entry point as listed in the beginning of the mission template file, but does not use the entry point written in it it (for example, it does not use entry point 15 for the defender). It takes the ORDER of how it is written.

So for that operation, entry points would be as follows:

插入代码块:
    # Attacker initial spawn point  
     (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,4,[]),  ##Entry point 0 for add_reinforcements_to_entry
     (1,mtef_attackers|mtef_team_3,af_override_horse,aif_start_alarmed,2,[]),  ##Entry point 1 for add_reinforcements_to_entry
     (2,mtef_attackers|mtef_team_5,af_override_horse,aif_start_alarmed,2,[]),  ##Entry point 2 for add_reinforcements_to_entry

     # Initial defender spawn point
     (15,mtef_defenders|mtef_team_0|mtef_infantry_first,af_override_horse,aif_start_alarmed,4,[]),  ##Entry point 3 for add_reinforcements_to_entry
     (16,mtef_defenders|mtef_team_2|mtef_infantry_first,af_override_horse,aif_start_alarmed,2,[]),  ##Entry point 4 for add_reinforcements_to_entry
     (17,mtef_defenders|mtef_team_4|mtef_infantry_first,af_override_horse,aif_start_alarmed,2,[]),  ##Entry point 5 for add_reinforcements_to_entry

Learned it the hard way when I found attacker reinforcements spawning in the defender side... :smile:

I hope this helps someone!
 
Khamukkamu 说:
    (15,mtef_defenders|mtef_team_0|mtef_infantry_first,af_override_horse,aif_start_alarmed,4,[]),  ##Entry point 3 for add_reinforcements_to_entry

if you are going to leave those comments I would suggest to make it more clear. Replace "entry point" with "spawn record". Same with your header_operations.py and replace the "mission_template_entry_no" with "mission_template_spawn_record"

插入代码块:
 5) List of spawn records (list): Each spawn record is a tuple that contains the following fields:
#    5.1) entry-no: Troops spawned from this spawn record will use this entry
 
Hello,

I'm having a terrible time getting cartridges to show up reliably in merchant inventories. Is there some trick to make cartridges show up? If not, is there a command I can put in script_refresh_center_weaponsmith that will guarantee that every merchant has cartridges for sale? I was able to add firearms easily, but cartridges just don't show up (they show up on the cheat menu, so it seems to be just merchants that have this problem).

Thanks,
Matt

ps: I am using Autolykos' module system source, but I had a similar problem in native.
 
I am trying to add deployment feature in my mod,but i need to add one trigger in mission template.The problem is that when i put code appear syntax error or enexpendent indent ,the code look like : trigger = [ before_mission_start ,some scripts ,scripts bla bla ]), ].Were i must put this script to work it properly ,helps please
 
KnightV 说:
I am trying to add deployment feature in my mod,but i need to add one trigger in mission template.The problem is that when i put code appear syntax error or enexpendent indent ,the code look like : trigger = [ before_mission_start ,some scripts ,scripts bla bla ]), ].Were i must put this script to work it properly ,helps please

Maybe just post trigger you added as code instead of  meaningless managed  example.
 
EmielRegis? 说:
KnightV 说:
I am trying to add deployment feature in my mod,but i need to add one trigger in mission template.The problem is that when i put code appear syntax error or enexpendent indent ,the code look like : trigger = [ before_mission_start ,some scripts ,scripts bla bla ]), ].Were i must put this script to work it properly ,helps please

Maybe just post trigger you added as code instead of  meaningless managed  example.
I shall as soon as i can because i am busy now ,sorry
 
HyperCharge 说:
How was the ordering in module.ini ?

texture > material > mesh



Ubai 说:
I'm having a terrible time getting cartridges to show up reliably in merchant inventories. Is there some trick to make cartridges show up? If not, is there a command I can put in script_refresh_center_weaponsmith that will guarantee that every merchant has cartridges for sale? I was able to add firearms easily, but cartridges just don't show up (they show up on the cheat menu, so it seems to be just merchants that have this problem).

you should show us your code (module_items.py for the cartridges, module_scripts.py for the merchant, module.ini option about firearms, etc)

without it I would suggest:
1) check your flags on module_items.py
2) your merchant store is just a troop + inventory. You can add a item to that troop inventory directly. The operation used to add random items of a type is just a shortcut for the random effect, it simple picks some stuff of a certain type (one handed weapons) at a quantity (5 samples) and adds to the inventory.
3) make sure your merchant has enough inventory space (that it is not full before adding ammo)



KnightV 说:
I am trying to add deployment feature in my mod,but i need to add one trigger in mission template.The problem is that when i put code appear syntax error or enexpendent indent ,the code look like : trigger = [ before_mission_start ,some scripts ,scripts bla bla ]), ].Were i must put this script to work it properly ,helps please

shows us the compiler log, much easier to understand.

when adding triggers remember they may be a singular entity
a= ( )

or a group of triggers
a= [trigger1, trigger2, trigger3]

and they are added to a template in different ways. See other examples on your module_mission_templates.py and follow the same pattern.
 
Jesus KnightV....

Try to do something easier for now. Your module is total disaster. ****load of different code added,  and not even counting several modmerger plugins dropped randomly.
Nothing beside COOP is marked in any way. You have bugs inside constans, commons and god knows where else.
Your module also using completly outdated version of WSE.

You are not prepared for something like this yet.
 
EmielRegis? 说:
Jesus KnightV....

Try to do something easier for now. Your module is total disaster. ****load of different code added,  and not even counting several modmerger plugins dropped randomly.
Nothing beside COOP is marked in any way. You have bugs inside constans, commons and god knows where else.
Your module also using completly outdated version of WSE.

You are not prepared for something like this yet.
First of all i want to say that i use WSE 4.5.2 it is the Lastest version 
Coop may to be.It is nonsense that the the isn't codes marked with #coop .I dont know were did you looking for Coop ,but it is in almost in all module py



About bugs in constants ,i dont understand What you saying saying " bugs in constants
 
KnightV 说:
About bugs in constants ,i dont understand What you saying saying " bugs in constants

You have old wse operations inside module. The fact that you dont understand what Im saying is another reason for settling with smaller project at the moment. Continue  current one later, with more experience.  There is no point in helping you with this one.

Maybe try to sucesfully add only few of modmerger plugins for start? Or COOP alone without all other stuff.
 
KnightV 说:
About bugs in constants ,i dont understand What you saying saying " bugs in constants

I haven't look at your modsys, but I will suggest something anyway:

1) Create a new thread here in the Forge. Use a title like: "Mod: XXXX | Dev log | Need help"
2) Start over from scratch. That means you go back to whatever is your base module (Native 1.171, VC 2.036, Floris, etc)
3) Make your project open source. Put it on Github.com.
4) When adding new code/features to your mod: post on your thread, explain what you are doing (which OSP you are using, add a link to it, show what you did, etc). Publish the changes on github.com using a branch (google "git branch")
  include on your dev log: any compiler issues, any in-game errors, screenshots of any issues, etc

That way you may get more specific help. You will also need to move slower (baby steps), making sure your changes work before moving to the next OSP integration. And you will have a chance to get feedback from other modders about your workflow and selection of features.

my 2 cents
 
状态
不接受进一步回复。
后退
顶部 底部