stronghold earnings help

Post » Sat May 28, 2011 5:31 am

Hello, I've done many smaller mods for myself in the past but the projects I'm working on now are larger than any of those, I really need some advise so I can do what I'm wanting to do correctly.
First of all, I'm making my own custom version of special slave companions, and I wanted them to have even more options.
Here's the scenario, I want one of my slaves to be able to oversee some way to make profits from the strongholds. A perfect example of what I want is svenja snow-song, the nord who oversees thirsk for you once that quest has been resolved. I guess the idea is that the stronghold occupants could be tasked with "foraging" or "hunting" and that I could talk to my slave to receive a weekly profit. I've been looking over said nord's dialogue and it doesn't seem difficult, however, I don't want to just be able to collect profits from my servant any time BEFORE I get the stronghold or in the case of using join all houses, strongholds. I've reviewed some of the possible variables, and found the global variable stronghold, I'm assuming I could set this to =1 to accomplish what I want but I wanted to be sure before I. Go through a long process in vain and have to redo it. Id also like foor my slave to be able to do something similar with being the factor of ravefn rock, it IS an ebony mine after all.

My other issue is this, I want to do something which allows me to have the armorer AND the general merchant in raven rock rather than choosing between the two, but as of yet I have no clue where to begin with this.

Any help would be much appreciated, as I am in a bit of a hurry to see this completed. Thanks!
User avatar
Lory Da Costa
 
Posts: 3463
Joined: Fri Dec 15, 2006 12:30 pm

Post » Fri May 27, 2011 8:37 pm

Any minute now...
User avatar
CORY
 
Posts: 3335
Joined: Sat Oct 13, 2007 9:54 pm

Post » Sat May 28, 2011 6:19 am

hey guy, read the sticky, be patient, this section of the forums is kinda dusty with disuse.

you're doing something similar with what i just did to the fighter's guild.

for your servant's script, you'll want something like

if ( Stronghold == 0 )     diasableelse     enableendif


you'll also want to check "join all houses" (a mod i'm assuming) to see if they use thier own stronghold globals.

as for having an armorer and a GM, chose the armorer, install my mod, and leave an EEC hireling in the building, or chose the merchant and leave a house redoran minion behind =D

in all seriousness, make copies of the armorer and GM, place them in the different interiors (if i remember right, the merchant shop and the armory are two different interiors)

edit: forgot that the interiors are disabled before the script enables them, just placing the NPCs should be enough.
User avatar
MR.BIGG
 
Posts: 3373
Joined: Sat Sep 08, 2007 7:51 am

Post » Sat May 28, 2011 6:59 am

hey guy, read the sticky, be patient, this section of the forums is kinda dusty with disuse.

you're doing something similar with what i just did to the fighter's guild.

for your servant's script, you'll want something like

if ( Stronghold == 0 )     diasableelse     enableendif


you'll also want to check "join all houses" (a mod i'm assuming) to see if they use thier own stronghold globals.

as for having an armorer and a GM, chose the armorer, install my mod, and leave an EEC hireling in the building, or chose the merchant and leave a house redoran minion behind =D

in all seriousness, make copies of the armorer and GM, place them in the different interiors (if i remember right, the merchant shop and the armory are two different interiors)

edit: forgot that the interiors are disabled before the script enables them, just placing the NPCs should be enough.


I appreciate the help RAKninja, however scripting isn't really my specialty. As the special slave companions are another mod, they already have scripts with special dialogue services, how would I add this special script without it causing the other features to also only be enabled when I have a stronghold, I could paste the script if you need a referance.

Additionally ill definately check out your mod when I get on an online computer (I'm on my droid) as it seems in line with the theme I'm working on, however when I said I wanted to have the armorer and gm I meant building and all, just as a way to make raven rock a little bigger and more like an actual town. Any ideas where to begin with that, id even settle for a console code if I knew there was one for it.
User avatar
Alberto Aguilera
 
Posts: 3472
Joined: Wed Aug 29, 2007 12:42 am

Post » Fri May 27, 2011 8:02 pm

ah, i see

in that case, you'll want to add conditions to your dialog for the stronghold variable. if your services are scripted, and started through dialog, that should be sufficient. i thought you were talking about an NPC you made that was going to be in the same place, and i was just thinking to myself that it would be easier to just have the NPC in the interior, as this wouldent be accessible till the stronghold was built anyway.

as you'll be calling targeted scripts from dialog, reread the scripting for dummies section on limitations of targeted scripts to make sure you didnt forget something, i know i did my first revision. I'm something of a beginner myself, but i'm fairly confident on my abilities. i wouldent mind proofreading your scripts, and i'm sure other, more experienced folks will glance at it at least.

building and all? that seems like something of a project, as i think both buildings occupy the same space (i could be very wrong, i've only done the expansions once, despite owning them all these years). it could be done if you design a new building for it, and have the door lead to the interior of the shop you didnt choose. personally, i'd avoid monkeying around with the script attached to the default, and writing a new script that disables your building until the journal index is the same as the one that places the default shop.

i havent done much with placing anything other than NPCs, so i am unsure of the best way to trigger the script to activate the new building. first method that pops into my head is by global script started by a script attached by an invisible activator in the area. the activator's script would start the global on the journal index that notifies you that you have begun building the shop, something like

begin shopscriptactivatorshort doonceif ( ( GetJournalIndex, "CO_4" ) < 21 ) ;if you have not decided the shop	returnelse	if ( doonce == 0 ) ;only start the script once		startscript, shopplace		disable		;disables activator after it does it's job		set doonce to 1		StopScript, shopscriptactivator	else		return		endifendifend


for the global, it'd look a bit like this

begin shopplaceshort doonceif ( ( GetJournalIndex, "CO_4" ) < 79 ) ;if the shop is not built	disable			;shop does not existelse	if ( doonce == 0 ) 	;only start the script once		enable		;places shop		set doonce to 1		StopScript, shopplace	else		return		endifendifend


you could fancy this up a bit like they do the default colony with "incomplete" models being enabled and disabled by different journal indexes.

oh, and this is prolly superfluous, as i seem to remember hearing about a mod that allready exists that does all this. i could be wrong though. oh, and unless you target the startscript in the activator, you'll have to target the enable part of the "shopplace" script to your building id. remember yo make your own copy if you use one of the default objects so you dont end up applying the script to all instances of a default item.
User avatar
Jhenna lee Lizama
 
Posts: 3344
Joined: Wed Jun 06, 2007 5:39 am

Post » Fri May 27, 2011 7:52 pm

ah, i see

in that case, you'll want to add conditions to your dialog for the stronghold variable. if your services are scripted, and started through dialog, that should be sufficient. i thought you were talking about an NPC you made that was going to be in the same place, and i was just thinking to myself that it would be easier to just have the NPC in the interior, as this wouldent be accessible till the stronghold was built anyway.

as you'll be calling targeted scripts from dialog, reread the scripting for dummies section on limitations of targeted scripts to make sure you didnt forget something, i know i did my first revision. I'm something of a beginner myself, but i'm fairly confident on my abilities. i wouldent mind proofreading your scripts, and i'm sure other, more experienced folks will glance at it at least.

building and all? that seems like something of a project, as i think both buildings occupy the same space (i could be very wrong, i've only done the expansions once, despite owning them all these years). it could be done if you design a new building for it, and have the door lead to the interior of the shop you didnt choose. personally, i'd avoid monkeying around with the script attached to the default, and writing a new script that disables your building until the journal index is the same as the one that places the default shop.

i havent done much with placing anything other than NPCs, so i am unsure of the best way to trigger the script to activate the new building. first method that pops into my head is by global script started by a script attached by an invisible activator in the area. the activator's script would start the global on the journal index that notifies you that you have begun building the shop, something like

begin shopscriptactivatorshort doonceif ( ( GetJournalIndex, "CO_4" ) < 21 ) ;if you have not decided the shop	returnelse	if ( doonce == 0 ) ;only start the script once		startscript, shopplace		disable		;disables activator after it does it's job		set doonce to 1		StopScript, shopscriptactivator	else		return		endifendifend


for the global, it'd look a bit like this

begin shopplaceshort doonceif ( ( GetJournalIndex, "CO_4" ) < 79 ) ;if the shop is not built	disable			;shop does not existelse	if ( doonce == 0 ) 	;only start the script once		enable		;places shop		set doonce to 1		StopScript, shopplace	else		return		endifendifend


you could fancy this up a bit like they do the default colony with "incomplete" models being enabled and disabled by different journal indexes.

oh, and this is prolly superfluous, as i seem to remember hearing about a mod that allready exists that does all this. i could be wrong though. oh, and unless you target the startscript in the activator, you'll have to target the enable part of the "shopplace" script to your building id. remember yo make your own copy if you use one of the default objects so you dont end up applying the script to all instances of a default item.



well, I'm on a pc at my family's home, but I forgot to copy the script and bring it with me, so I guess I'll have to do that a little later, I think that mod is called special slave companions at any rate. I skimmed the scripting tutorial (it looks like another language lol) I'm trying to work myself up to tackling it soon. as far as there being another mod out there that lets you have both buildings, (which if I'm not mistaken, and I don't THINK I am, isn't actually in the same space) I've been searching, and hoping with no luck, if anyone knows of where such a mod is, I'd simply love to know, cause it'd save me a hell of alot of frustration.
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Sat May 28, 2011 3:52 am

come to think of it, it might have just been having both shopkeepers. i didnt look too closely at it, and i tend to use things that make the game harder and harsher than more convenient =D

if i see it again when i'm browsing mods, and it does what you want it to, i'll be sure to let you know.
User avatar
Daniel Lozano
 
Posts: 3452
Joined: Fri Aug 24, 2007 7:42 am

Post » Sat May 28, 2011 9:06 am

below is the original script for the special slave companions



;ADD ADDITIONAL TOPICS IN THIS SECTION IF REQUIRED.

if ( mpaid == 1 )
if ( addOnce == 0 )
AddTopic "-combat"
AddTopic "-follow"
AddTopic "-others"
AddTopic "-maid service"
AddTopic "-entertainment"
AddTopic "-ownership"
AddTopic "-information"
AddTopic "-pleasure"
StartScript 1car_level
set companion to 1
set addOnce to 1
endif
endif

end


just to be complete about all this, these are other scripts of this mod
this is the shopkeeper's script

Begin 1car_SlaveTrader

short mtalked
short doOnce
short castOnce
short OnPCHitMe
short allGone

;for buying slaves... keep track so you can't "buy" them twice
short IvelaPaid
short AnnePaid
short DaniaPaid
short RangelaPaid
short EnaPaid
short GaldiirPaid
short AtisPaid
short DavidPaid

;for discount
short mdiscount

; the next lines are for defending slaves that aren't paid for
if ( doOnce == 0 )
if ( "1car_anne"->GetAttacked == 1 )
if (AnnePaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
if ("1car_dania"->GetAttacked == 1 )
if ( DaniaPaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
if ( "1car_Ena"->GetAttacked == 1 )
if ( EnaPaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
if ( "1car_galdiir"->GetAttacked == 1 )
if ( GaldiirPaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
if ( "1car_ivela"->GetAttacked == 1 )
if ( IvelaPaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
if ( "1car_rangela"->GetAttacked == 1 )
if ( RangelaPaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
if ( "1car_atis"->GetAttacked == 1 )
if ( AtisPaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
if ( "1car_david"->GetAttacked == 1 )
if ( DavidPaid == 0 )
StartCombat player
SetFight 90
SetDisposition 0
set doOnce to 1
endif
endif
endif

if ( allGone == 0 )
if ( IvelaPaid == 1 )
if ( AnnePaid == 1 )
if ( DaniaPaid == 1 )
if ( RangelaPaid == 1 )
if ( EnaPaid == 1 )
if ( GaldiirPaid == 1 )
if ( AtisPaid == 1 )
if ( DavidPaid == 1 )
set allGone to 1
endif
endif
endif
endif
endif
endif
endif
endif
endif

if ( allGone == 1 )
if ( CellChanged == 1 )
Disable
endif
endif

;self-preservation
if ( castOnce == 0 )
if ( OnPCHitMe == 1 )
set OnPCHitMe to 0
set castOnce to 1
cast, 1car_marcus_power, "1car_marcus"
StartCombat player
endif
endif

End


the leveling script

SetLongblade, p_longblade
SetBluntweapon, p_bluntweapon
SetShortblade, p_shortblade
SetSpear, p_spear
SetAxe, p_axe
SetHandtohand, p_handtohand

SetHeavyarmor, p_heavyarmor
SetMediumarmor, p_mediumarmor
SetLightarmor, p_lightarmor
SetUnarmored, p_unarmored
SetBlock, p_block

SetSneak, p_sneak

endif

StopScript 1car_level

end



the teleporting script

Begin 1car_tele_frost

float Timer

if ( MenuMode == 0 )
if ( Timer == 0 )
Cast 1gr_comp2_tele player
Set Timer to 1
elseif ( Timer < 4.5 )
Set Timer to ( Timer + GetSecondsPassed )
else
PositionCell -126 -476 -120 40 "Fort Frostmoth, General Quarters"
Set Timer to 0
StopScript 1car_tele_frost
endif
endif

End


I'm not sure if any of this will shed any light on the situation, but I thought it best to paste it all here while I had the chance. I'm assuming only the first script really mattered but better safe than sorry
User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Sat May 28, 2011 8:57 am

as for your original question of "how to make sure that only special topics are offered after you get stronghold, and ensuring that not ALL topics are restricted till then" i think this will do the trick, change this -

if ( mpaid == 1 )    if ( addOnce == 0 )        AddTopic "-combat"        AddTopic "-follow"        AddTopic "-others"        AddTopic "-maid service"        AddTopic "-entertainment"        AddTopic "-ownership"        AddTopic "-information"        AddTopic "-pleasure"        StartScript 1car_level        set companion to 1        set addOnce to 1    endifendif


to something like this -

[code]if ( mpaid == 1 )    if ( addOnce == 0 )        AddTopic "-combat"        AddTopic "-follow"        AddTopic "-others"        AddTopic "-maid service"        AddTopic "-entertainment"        AddTopic "-ownership"        AddTopic "-information"        AddTopic "-pleasure"        StartScript 1car_level        set companion to 1        set addOnce to 1    endif    if ( Stronghold == 1 )        if ( newdoonce == 0 )            Addtopic "specialdialog"            set newdoonce to 1        endif    endifendif
[/code]

you might be able to combine the new if block (if stronghold = 1) as an elseif added to the old if statement, i try to avoid comparing dissimilar values in elseifs though, i've had problems doing it, as in it wont work all the time.
User avatar
Sammygirl
 
Posts: 3378
Joined: Fri Jun 16, 2006 6:15 pm

Post » Sat May 28, 2011 9:10 am

as for your original question of "how to make sure that only special topics are offered after you get stronghold, and ensuring that not ALL topics are restricted till then" i think this will do the trick, change this -

if ( mpaid == 1 )    if ( addOnce == 0 )        AddTopic "-combat"        AddTopic "-follow"        AddTopic "-others"        AddTopic "-maid service"        AddTopic "-entertainment"        AddTopic "-ownership"        AddTopic "-information"        AddTopic "-pleasure"        StartScript 1car_level        set companion to 1        set addOnce to 1    endifendif


to something like this -

[code]if ( mpaid == 1 )    if ( addOnce == 0 )        AddTopic "-combat"        AddTopic "-follow"        AddTopic "-others"        AddTopic "-maid service"        AddTopic "-entertainment"        AddTopic "-ownership"        AddTopic "-information"        AddTopic "-pleasure"        StartScript 1car_level        set companion to 1        set addOnce to 1    endif    if ( Stronghold == 1 )        if ( newdoonce == 0 )            Addtopic "specialdialog"            set newdoonce to 1        endif    endifendif
[/code]

you might be able to combine the new if block (if stronghold = 1) as an elseif added to the old if statement, i try to avoid comparing dissimilar values in elseifs though, i've had problems doing it, as in it wont work all the time.

Thanks for that, Rak, I think it will help. Sorry for the long wait, had a lot goin on. Recently, I did a bunch of dialogue for the mod, the problem is its not all showing up correctly. I set up a topic in which the pc asks the slave differant things about themselves, simple really and I set it so asking about another special topic opens this dialogue option. That part works but when the dialogue topic appears and I click it, it only shows the first question asked, seems like last time I got heavy into the dialogue I encountered something similiar so I'm pretty sure its easily remedied, I just can't figure out how. Everything having to do with the topic is set up correctly, including proper choice placement and the id setting so only that particular npc has the dialogue. I've even updated hyperlinks hoping that might matter. I'm probably gonna have to break back out the dialogue tutorial. Oh and on the script, how would I set it so that they use the same general script I copied above. But only a specific slave had the dialogue, not just all the slaves for sale? Ill be back on later prolly to see if there's any new news.
User avatar
Pants
 
Posts: 3440
Joined: Tue Jun 27, 2006 4:34 am

Post » Sat May 28, 2011 7:09 am

what are your conditionals on the missing dialog options?

you're remembering that the game reads dialog responses from the top down, right? not really understanding the problem. you might have to break the responses into multiple topics.

as for the script, tell the truth, the slaves dont need the dialog stuff in it at all. you can just separate that part into an invisible activator placed somewhere you know the PC will go (like the stronghold interior) if you only want one NPC to have the dialog, set that NPCs id as the id conditional for the dialog responses. addtopic only teaches the PC the topic. NPCs know topics based on the conditionals in the responses
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm


Return to III - Morrowind