Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

I'll make this as quick as I can :smile:

I've been playing with SkyRe forever now, and recently re-installed Skyrim. I thought I'd try out PerMa, so I'll have to start a new game (only got to 20 or so) Would I have to reinstall all of my mods including the ones that are essential to PerMa? Or can I just uninstall Skyre and it's patches and put PerMa on and restart a new character?

 

A quick edit: I decided to go the long way but this time reinstall with MO. Will be my first time with it but have watched plenty of how to's and don't do's.

Edited by kathrynfr15
Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

So this has always been kind of a mystery to me but I don't know what search terms I can use to figure it out so I'll ask here: in the CK, for every vanilla weapon there is a ton of enchanted versions of them. What are they for? Is that how the game distributes enchanted weapons to the leveled lists? Are they treated differently from the base weapon type for the purposes of crafting recipes (in the sense of their being used as in ingredient)?

Link to comment
Share on other sites

Cool, thanks again.

New question: a nasty surprise in my attempt to manipulate FormLists is that the only function on FormLists that will remove items will only remove items I have added via script. If I design my mod with FormLists pre-loaded with items, I cannot remove those items.

Is there a way around this, or any other function that will allow me to remove items from FormLists that I have not added via script? The only workaround I can think of is to make the FormLists I actually want to work with empty at start and then add the "default" items to them from another FormList by script. Which is a pain in the ass, but if it's the only way...

Edit: Welp, looks like what I am trying to do is f***ed anyway: http://forums.bethsoft.com/topic/1365445-bug-formlist-functions-seem-to-break-under-certain-conditions/

Edit 2: Seems like my proposed workaround is essentially the recommended way of dealing with this every single time: http://www.creationkit.com/Talk:RemoveAddedForm_-_FormList

Edited by LittleRaskols
Link to comment
Share on other sites

Maybe related to the above: I am having trouble getting my scripts to accurately report whether a FormList has a Form. If I have a weapon with a FormID of XX000300, and I do the following:

Form wpEquipped
;other stuff
wpEquipped = PlayerRef.GetEquippedWeapon(true) as Form

Unexpected things will happen when I try to use this. First up, using GetFormID() on it returns "0" as its FormID. Second, when I do this:

bool bHasWep = MySpecialWeaponsList.HasForm(wpEquipped)

It always returns false. It also does not seem to add it correctly.

 

What the hell is going on? It's like the "Form" I get from a call that returns a Form (or a type descended from Form) doesn't return the same Form as is defined in the FormLists... but then how do I detect FormList membership from player-owned items? This seems like a pretty basic thing, I must be missing something obvious.

Edited by LittleRaskols
Link to comment
Share on other sites

Warning: If you are looking at the CK Wiki without logging in you aren't seeing all of the important updates users have made over time!

 

The Formlist problems with RemoveAddedForm were fixed many versions ago. But, yes, RemoveAddedForm does exactly what the name says. It can't remove a form that was placed into the list in the CK. The easiest way to deal with it is simply to create two lists. Fill one in the CK, then use a little loop to copy all of the values over to the second list. That second list is then the one you use throughout your mod.

 

HasForm works just fine. What happens if you try the very direct:

bool bHasWep = MySpecialWeaponsList.HasForm(PlayerRef.GetEquippedWeapon(true))

There no need to explicitly cast the result of GetEquippedWeapon into Form.

Link to comment
Share on other sites

Warning: If you are looking at the CK Wiki without logging in you aren't seeing all of the important updates users have made over time!

s***, seriously? Getting an account there right the hell now, thanks!

 

The Formlist problems with RemoveAddedForm were fixed many versions ago. But, yes, RemoveAddedForm does exactly what the name says. It can't remove a form that was placed into the list in the CK. The easiest way to deal with it is simply to create two lists. Fill one in the CK, then use a little loop to copy all of the values over to the second list. That second list is then the one you use throughout your mod.

Good to know that I don't have to custom define a remove form script, for sure. And I had buckled down and done what you're suggesting, tedious as hell though it was. I was already doing a similar thing with an empty list to ensure that DLC-added items only showed up if you had the DLC (and its addon for my mod, where the DLC-added items are actually in their list), so this solution was a natural extension of that.

 

The only other mystery for me is whether I have to add them to the empty list in the same script as I plan to remove them, but I will find out soon enough.

 

HasForm works just fine. What happens if you try the very direct:

bool bHasWep = MySpecialWeaponsList.HasForm(PlayerRef.GetEquippedWeapon(true))
There no need to explicitly cast the result of GetEquippedWeapon into Form.

 

Yeah I stopped typecasting it like that when I realize that, oh derp, basic polymorphism, it is a Form already.

 

No dice with what you suggested, unfortunately. It's baffling, this seems like a really basic thing, right? I expected it would work just fine. I do wonder what will happen if I change where I am filling my working form lists. Right now I have a separate initialization script and MCM script (this is all in the MCM if that makes a difference, although perk and ability conditions detect form list membership just fine), which has seemed a little redundant for a while.

 

Appreciate all your help (especially that info about the CK Wiki!). I'll post a fuller example of what I am doing below if you feel like checking it out; if not that's fine.

 

 

 

int Function DetectEquippedBowType()	
	Weapon wpEquipped
	int nType
	
	;if equipped w/ bow
	if (PlayerRef.GetEquippedItemType(0) == 7)
		wpEquipped = PlayerRef.GetEquippedWeapon(true)
		bInvalidWeapon = false					;This is declared outside this function
		
		;if a shortbow
		;This is where my test weapon resides. All non-script checks properly detect that is is of this type.
                ;I have also tried a different test weapon. Does not seem to matter.
		if ShortbowList.HasForm(wpEquipped)
			nType = 1
	
		;else, if a longbow
		elseif LongbowList.HasForm(wpEquipped)
			nType = 2
	
		;else, it has no type
		;This is the default option for anything else. 
		;My test weapon is always identified as this, because it seems it can not be detected in any other list.
		else
			nType = 0
			;Used in the MCM menu that calls this function
			MenuOptions[nType] = "No Type"
			
		endif
			
	;not equipped with bow, invalid
	else
		bInvalidWeapon = true
		nType = 0
		MenuOptions[nType] = "Non-Bow"
	endif
	
	return nType
	
EndFunction

 

When I tried what you suggested out, all the checks against HasForm(wpEquipped) were HasForm(PlayerRef.GetEquippedWeapon(true)), I just reverted it. I removed some sanity checks because I know it gets to the part I copied based on its behavior.

 

Also potentially of note is that wpEquipped.GetFormID() and PlayerRef.GetEquippedWeapon(true).GetFormID() both return 0, which like, why, why would that happen it makes no sense.

 

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...