PDA

View Full Version : Drag-enabled text inside user created reference entry?



Varsuuk
May 10th, 2016, 17:49
For example, if I create a background into a module's db.xml and I want to add some text that the user can drag to some part of their character forM to be input AS text - is that possible?

Since I could not drag from existing test in the background pop up, I tried adding a link since those were dragable, hoping that a link with type or class="string" would do that. It was a total shot in dark (that missed) but figured think like a coder and see if it was a thing ;)

Zacchaeus
May 10th, 2016, 17:59
I think you'll need to start looking at creating extensions or some such for some of the things you ant (or are trying) to do. Drag/drop works with things that drag/drop from reference texts. So in the case of backgrounds the whole back ground drag/drops and you can also drag/drop the stuff from the tables in backgrounds. So (and I'm sort of guessing here since I'm not a scripter) it's not when the dragging is happening but in the dropping that the scripting decides what to do with what you are dropping. So there'll be a script somewhere (I think one of the developers pointed out where to you in another post) which handles all that kind of thing and it will recognize when you drop a background into the character sheet what to do with it.

On the other hand something that it isn't programmed to recognize as being part of the character sheet won't get processed. So if you think of what can be drag/dropped (and they aren't just links they are links to something) then you may have a better idea of what you need to do to get your ideas to work.

Varsuuk
May 10th, 2016, 18:42
Yeah, I saw Moon's post reply after writing this. This was my idea for a workaround.

Now that he pointed me to the scripts that read the XML - a lot of my questions may be answered without needing to take folk's time. I'm quite excited, didn't even think of the Lua scripts and that rule sets of course need to access the db... It was quite shortsighted of me. I was purposefully not looking at rule sets and Lua so I wouldn't get distracted by later stage topics.

Instead, looking at the Lua scripts helps to see what the parse output should/can be.

This is Game Chaging for me.
(Did you see what I did there...?)
(...Ok, I apologize, lol)

Varsuuk
May 10th, 2016, 19:41
Wow, got back to desk, pulled out laptop modified one file for like 8 pasted lines plus small change and blam... I modified it so could parse a language list in "verbose" or "list of languages" format and merging my module's background resulted in adding the languages individually to the char sheet.


Wow, that was easy and fast!

Obviously, modifying 5E.pak for this is not the way to go but I can create a copy, check it in then use riffs to be able to merge in changes to my modified 5E. Unless they want that functionality in their base. I'd send the changes once home and can access net with my laptop vs the iPad I'm on now. Im sure they are quite capable of doing this as nearly all the code was theirs already except for some minor if/elsing. They either found a problem doing this or just never thought to update it.